libobs: Prevent adding of null user sources

Not entirely sure how this happened but I *think* that a null source was
somehow being added to the list of user sources for one particular user,
and then I noticed this code does not check to see whether the source is
null or not.
This commit is contained in:
jp9000 2014-05-15 18:55:29 -07:00
parent 999d8ee916
commit 457dc6520b

View File

@ -777,6 +777,7 @@ bool obs_add_source(obs_source_t source)
struct calldata params = {0};
if (!obs) return false;
if (!source) return false;
pthread_mutex_lock(&obs->data.sources_mutex);
da_push_back(obs->data.user_sources, &source);