From 9d82760405ce507fa6421c8f04d42280d34cc516 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 30 Apr 2015 05:14:38 -0700 Subject: [PATCH] libobs: Warn if source released after shutdown Instead of letting this area of code crash, check to see if the core is still active or not, and safely warn and ignore the release if so. --- libobs/obs-source.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libobs/obs-source.c b/libobs/obs-source.c index eaf3604c7..e27e4c804 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -308,6 +308,12 @@ void obs_source_addref(obs_source_t *source) void obs_source_release(obs_source_t *source) { + if (!obs) { + blog(LOG_WARNING, "Tried to release a source when the OBS " + "core is shut down!"); + return; + } + if (!source) return; -- GitLab