mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix segfault if no RCT2 install path
This commit is contained in:
parent
e996c83b70
commit
3c29b15de9
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue