提交 9d827604 编写于 作者: J jp9000

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.
上级 a090ed57
...@@ -308,6 +308,12 @@ void obs_source_addref(obs_source_t *source) ...@@ -308,6 +308,12 @@ void obs_source_addref(obs_source_t *source)
void obs_source_release(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) if (!source)
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册