mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 12:03:07 +01:00
Co-authored-by: Christopher G. Dolan <cgdolan@users.noreply.github.com>
This commit is contained in:
@@ -559,16 +559,19 @@ namespace OpenRCT2
|
||||
{
|
||||
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
|
||||
struct CrashAdditionalFileRegistration
|
||||
{
|
||||
~foo()
|
||||
CrashAdditionalFileRegistration(const std::string& path)
|
||||
{
|
||||
// Register the file for crash upload if it asserts while loading.
|
||||
crash_register_additional_file("load_park", path);
|
||||
}
|
||||
~CrashAdditionalFileRegistration()
|
||||
{
|
||||
// Deregister park file in case it was processed without hitting an assert.
|
||||
crash_unregister_additional_file("load_park");
|
||||
}
|
||||
} f;
|
||||
} crash_additional_file_registration(path);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user