diff --git a/Common/OS.cpp b/Common/OS.cpp
index 666101d70cbac867616bf0e5dc8b1e17d222bf17..d78fb9f5153c14ef2fced9026668c67ebeba193d 100644
--- a/Common/OS.cpp
+++ b/Common/OS.cpp
@@ -576,12 +576,12 @@ int SystemCallExe(const std::string &exe, const std::string &argsOrCommand,
     return 1;
   }
   if(!blocking) cmd += " &";
-#if defined(HAVE_FLTK)
-  FlGui::instance()->lock();
+#if defined(HAVE_FLTK) // FIXME: remove
+  if(FlGui::available()) FlGui::instance()->lock();
 #endif
   Msg::Info("Calling '%s'", cmd.c_str());
-#if defined(HAVE_FLTK)
-  FlGui::instance()->unlock();
+#if defined(HAVE_FLTK) // FIXME: remove
+  if(FlGui::available()) FlGui::instance()->unlock();
 #endif
   if(!system(cmd.c_str())) return 1;
 #endif