From 01ace109bab7a458abd9c05717dd49ec1f0dfdf3 Mon Sep 17 00:00:00 2001 From: bcoconni Date: Sun, 24 Nov 2013 14:50:11 +0100 Subject: [PATCH] Fixed a crash: the singleton needs to be instantiated the first time SGCommandMgr::instance() is called --- simgear/structure/commands.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/structure/commands.cxx b/simgear/structure/commands.cxx index 9a410936..752f880c 100644 --- a/simgear/structure/commands.cxx +++ b/simgear/structure/commands.cxx @@ -42,7 +42,7 @@ SGCommandMgr::~SGCommandMgr () SGCommandMgr* SGCommandMgr::instance() { - return static_instance; + return static_instance ? static_instance : new SGCommandMgr; } void -- 2.39.5