Fix segfault if no RCT2 install path

This commit is contained in:
Ted John 2018-02-10 21:37:25 +00:00
parent e996c83b70
commit 3c29b15de9
1 changed files with 6 additions and 5 deletions

View File

@ -818,6 +818,11 @@ void window_close_top()
*/
void window_close_all()
{
if (gWindowNextSlot == nullptr)
{
return;
}
window_close_by_class(WC_DROPDOWN);
for (rct_window * w = RCT2_LAST_WINDOW; w >= g_window_list; w--)
@ -2667,11 +2672,7 @@ void window_reset_visibilities()
void window_init_all()
{
if (gWindowNextSlot != nullptr)
{
window_close_all();
}
window_close_all();
gWindowNextSlot = g_window_list;
}