1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix #14042: Park Crashes whilst saving

This commit is contained in:
Ted John
2021-02-09 23:51:31 +00:00
parent 41d09a2691
commit 1cb3330779

View File

@@ -238,7 +238,12 @@ public:
TrackDesign* trackDesign = static_cast<TrackDesign*>(intent->GetPointerExtra(INTENT_EXTRA_TRACK_DESIGN));
auto* w = window_loadsave_open(
type, defaultName,
[callback](int32_t result, std::string_view path) { callback(result, std::string(path).c_str()); },
[callback](int32_t result, std::string_view path) {
if (callback != nullptr)
{
callback(result, std::string(path).c_str());
}
},
trackDesign);
return w;
}