1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 03:53:07 +01:00

Register park being loaded for crash upload

This commit is contained in:
Michał Janiszewski
2022-08-04 19:45:48 +02:00
parent 4243bf0d8e
commit 0be5c9d720

View File

@@ -541,6 +541,18 @@ namespace OpenRCT2
const std::string& path, bool loadTitleScreenOnFail = false, bool asScenario = false) final override
{
log_verbose("Context::LoadParkFromFile(%s)", path.c_str());
// Register the file for crash upload if it asserts while loading.
crash_register_additional_file("load_park", path);
// Deregister park file in case it was processed without hitting an assert.
struct foo
{
~foo()
{
crash_unregister_additional_file("load_park");
}
} f;
try
{
if (String::Equals(Path::GetExtension(path), ".sea", true))