If no history file is given through prefs, create a default one. 06/10706/2
Bruno JOFRET [Wed, 6 Mar 2013 08:29:47 +0000 (09:29 +0100)]
Change-Id: Ic89f52916e5529d57aa3559ea6313baa5a27ebcc

scilab/modules/history_manager/src/cpp/HistoryFile.cpp

index 84fbb62..a4d3315 100644 (file)
@@ -74,7 +74,7 @@ void HistoryFile::setFilename(std::string filename)
 BOOL HistoryFile::setDefaultFilename(void)
 {
     const ScilabPreferences* prefs = getScilabPreferences();
-    if (prefs != NULL)
+    if (prefs != NULL && prefs->historyFile != NULL)
     {
         const char* prefHistoryFile = prefs->historyFile;
         this->setFilename(expandPathVariable((char*)prefHistoryFile));