Skip to content

Commit 7dd4cd7

Browse files
committed
Prevent running on private sources
1 parent 30fcba6 commit 7dd4cd7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

source-record.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ static void source_record_delayed_destroy(void *data)
10881088

10891089
obs_service_release(context->service);
10901090

1091-
if (context->video_output) {
1091+
if (context->video_output && context->view) {
10921092
obs_view_set_source(context->view, 0, NULL);
10931093
obs_view_remove(context->view);
10941094
context->video_output = NULL;
@@ -1250,6 +1250,11 @@ static void source_record_filter_tick(void *data, float seconds)
12501250
if (!parent)
12511251
return;
12521252

1253+
if (obs_obj_is_private(parent)) {
1254+
context->closing = true;
1255+
return;
1256+
}
1257+
12531258
if (context->enableHotkey == OBS_INVALID_HOTKEY_PAIR_ID)
12541259
context->enableHotkey = obs_hotkey_pair_register_source(
12551260
parent, "source_record.enable", obs_module_text("SourceRecordEnable"), "source_record.disable",

0 commit comments

Comments
 (0)