Fix #4891: Crash at loading save file

Caused by `_listItems` getting `free`d (and set to `NULL`) before it was
used.

Regression introduced in 11a2b98e58.
This commit is contained in:
Michał Janiszewski committed 2016-12-20 15:34:41 +01:00
1 parent d1a97cc021
commit 9e321b69ee
1 file changed
+1 -1
+1 -1
View File
@@ -721,9 +721,9 @@ static void window_loadsave_select(rct_window *w, const char *path)
case (LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME) :
save_path(&gConfigGeneral.last_save_game_directory, path);
safe_strcpy(gScenarioSavePath, path, MAX_PATH);
window_loadsave_invoke_callback(MODAL_RESULT_OK, path);
window_close(w);
gfx_invalidate_screen();
window_loadsave_invoke_callback(MODAL_RESULT_OK, path);
break;
case (LOADSAVETYPE_SAVE | LOADSAVETYPE_GAME) :
save_path(&gConfigGeneral.last_save_game_directory, path);