Supertux can now run even if we were unable to open an audio device
[supertux.git] / src / scripting / squirrel_util.cpp
index 1ece08c..b9c9ffa 100644 (file)
@@ -112,7 +112,10 @@ void exit_squirrel()
     debugger = NULL;
   }
 #endif
-  sq_close(global_vm);
+
+  if (global_vm)
+    sq_close(global_vm);
+
   global_vm = NULL;
 }