]> git.mxchange.org Git - simgear.git/commitdiff
Fixed a crash: the singleton needs to be instantiated the first time SGCommandMgr...
authorbcoconni <bcoconni>
Sun, 24 Nov 2013 13:50:11 +0000 (14:50 +0100)
committerbcoconni <bcoconni>
Sun, 24 Nov 2013 13:50:11 +0000 (14:50 +0100)
simgear/structure/commands.cxx

index 9a41093653d25a4346c3b439f40e538aae11e1fb..752f880c2ad13c60eb36f63e987516a8e77d4854 100644 (file)
@@ -42,7 +42,7 @@ SGCommandMgr::~SGCommandMgr ()
 SGCommandMgr*
 SGCommandMgr::instance()
 {
-    return static_instance;
+    return static_instance ? static_instance : new SGCommandMgr;
 }
 
 void