Skip to content
Snippets Groups Projects
Commit ef606b92 authored by Bastien Gorissen's avatar Bastien Gorissen
Browse files

Removes a compilation warning and a crash when gmsh was run with the gui unavailable.

parent 0a2909a0
No related branches found
No related tags found
No related merge requests found
...@@ -460,9 +460,11 @@ void OpenProject(std::string fileName) ...@@ -460,9 +460,11 @@ void OpenProject(std::string fileName)
CTX::instance()->recent_files[0] = fileName; CTX::instance()->recent_files[0] = fileName;
if (CTX::instance()->history_size < 5) if (CTX::instance()->history_size < 5)
CTX::instance()->history_size++; CTX::instance()->history_size++;
FlGui::instance()->menu->fillRecentHistoryMenu(); #if defined(HAVE_FLTK)
if(FlGui::available())
FlGui::instance()->menu->fillRecentHistoryMenu();
#endif
} }
CTX::instance()->lock = 0; CTX::instance()->lock = 0;
#if defined(HAVE_FLTK) #if defined(HAVE_FLTK)
......
...@@ -113,7 +113,7 @@ static void add_scripting(GMSH_PostPlugin *p, PView *view) ...@@ -113,7 +113,7 @@ static void add_scripting(GMSH_PostPlugin *p, PView *view)
if(view){ if(view){
for(int i = 0; i < p->getNbOptions(); i++){ for(int i = 0; i < p->getNbOptions(); i++){
if(p->getOption(i)->str == "iView") { if(p->getOption(i)->str == "iView") {
oldIndex = p->getOption(i)->def; oldIndex = (int)(p->getOption(i)->def);
p->getOption(i)->def = view->getIndex(); p->getOption(i)->def = view->getIndex();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment