[Menus] Fix menu crash

This commit is contained in:
momo5502 2017-02-13 19:58:29 +01:00
parent 90c646e698
commit 9c66d49f72

View File

@ -530,7 +530,7 @@ namespace Components
if (menuList && reinterpret_cast<DWORD>(menuList) != 0xDDDDDDDD)
{
// Parse scriptmenus!
if (menuList->menus[0]->window.name == "default_menu"s || Utils::String::EndsWith(filename, ".menu"))
if (menuList->menuCount > 0 && menuList->menus[0] && menuList->menus[0]->window.name == "default_menu"s || Utils::String::EndsWith(filename, ".menu"))
{
if (FileSystem::File(filename).exists())
{