mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
Fix segfault if no RCT2 install path
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user