Fixed a crash: the singleton needs to be instantiated the first time SGCommandMgr::instance() is called
This commit is contained in:
@@ -42,7 +42,7 @@ SGCommandMgr::~SGCommandMgr ()
|
|||||||
SGCommandMgr*
|
SGCommandMgr*
|
||||||
SGCommandMgr::instance()
|
SGCommandMgr::instance()
|
||||||
{
|
{
|
||||||
return static_instance;
|
return static_instance ? static_instance : new SGCommandMgr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user