Browse Source

Don't crash if g_qmlEngine is not available on destruction

Tobias Hieta 9 years ago
parent
commit
9364c9083b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/ui/Globals.cpp

+ 2 - 1
src/ui/Globals.cpp

@@ -44,7 +44,8 @@ void Globals::SetContextProperty(const QString& property, const QVariant& value)
 /////////////////////////////////////////////////////////////////////////////////////////
 void Globals::EngineDestroy()
 {
-  delete g_qmlEngine;
+  if (g_qmlEngine)
+    delete g_qmlEngine;
   g_qmlEngine = nullptr;
 }