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.
This commit is contained in:
jp9000
2015-04-30 05:14:38 -07:00
parent a090ed5795
commit 9d82760405

View File

@@ -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;