Check for ui_sidebar_menus being null before using it.

develop
Ben Lubar 2015-12-17 10:54:19 -06:00
parent 80ec5ab043
commit 9bccf457c5
1 changed files with 26 additions and 23 deletions

@ -1550,6 +1550,8 @@ bool Core::Init()
if (!server->listen(RemoteClient::GetDefaultPort()))
cerr << "TCP listen failed.\n";
if (df::global::ui_sidebar_menus)
{
vector<string *> & args = df::global::ui_sidebar_menus->unk.anon_2;
for (auto it = args.begin(); it != args.end(); )
{
@ -1582,6 +1584,7 @@ bool Core::Init()
it++;
}
}
}
cerr << "DFHack is running.\n";
return true;