From cb1911280a98d4ac3aeef592ecbbbf1da2e9d177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sat, 28 Jan 2017 21:30:56 +0100 Subject: [PATCH] Don't crash if path to RCT2 is NULL This can happen when `game_path` entry gets removed from `config.ini` --- src/openrct2/rct2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/rct2.c b/src/openrct2/rct2.c index b5a76638b3..e1b916a392 100644 --- a/src/openrct2/rct2.c +++ b/src/openrct2/rct2.c @@ -194,7 +194,7 @@ sint32 rct2_init_directories() if (str_is_null_or_empty(gCustomRCT2DataPath)) { // check install directory - if (!platform_original_game_data_exists(gConfigGeneral.rct2_path)) { + if (gConfigGeneral.rct2_path == NULL || !platform_original_game_data_exists(gConfigGeneral.rct2_path)) { log_verbose("install directory does not exist or invalid directory selected, %s", gConfigGeneral.rct2_path); if (!config_find_or_browse_install_directory()) { utf8 path[MAX_PATH];