1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 12:33:17 +01:00

Fix dereferencing memory from a temporary object (#15137)

This commit is contained in:
ζeh Matt
2021-07-31 07:34:40 -07:00
committed by GitHub
parent 69f0020a62
commit 6b94e81622

View File

@@ -739,7 +739,8 @@ namespace Config
desc.filters[1].pattern = "*";
desc.filters[2].name = nullptr;
desc.initial_directory = Platform::GetFolderPath(SPECIAL_FOLDER::USER_HOME).c_str();
const auto userHomePath = Platform::GetFolderPath(SPECIAL_FOLDER::USER_HOME);
desc.initial_directory = userHomePath.c_str();
return platform_open_common_file_dialog(installerPath, &desc, 4096);
}