This commit is contained in:
WarmUpTill
2026-04-29 14:17:52 +02:00
committed by WarmUpTill
parent 6e0f7ab38f
commit 10daa38921
4 changed files with 24 additions and 25 deletions

View File

@@ -28,6 +28,8 @@ static constexpr bool handleUncleanShutdown = true;
static bool wasCleanShutdown = false;
static bool suppressCrashDialog = false;
static char *sentinelFile = nullptr;
bool GetSuppressCrashDialog()
{
return suppressCrashDialog;
@@ -58,7 +60,6 @@ static void handleShutdown(enum obs_frontend_event event, void *)
return;
}
char *sentinelFile = obs_module_config_path(sentinel.data());
if (!sentinelFile) {
return;
}
@@ -78,7 +79,8 @@ static void handleShutdown(enum obs_frontend_event event, void *)
static void setup()
{
char *sentinelFile = obs_module_config_path(sentinel.data());
// Freed in handleShutdown()
sentinelFile = obs_module_config_path(sentinel.data());
if (!sentinelFile) {
return;
}
@@ -106,7 +108,6 @@ static void setup()
file.write("running");
file.close();
bfree(sentinelFile);
obs_frontend_add_event_callback(handleShutdown, nullptr);
return;