libobs: Fix null potential pointer dereference
When a source type has been removed (i.e. its plugin has been removed) info can be null, which is permitted.
This commit is contained in:
parent
68bdadf812
commit
2c3ea4af55
@ -356,7 +356,7 @@ static obs_source_t *obs_source_create_internal(const char *id,
|
||||
if (info && info->create)
|
||||
source->context.data =
|
||||
info->create(source->context.settings, source);
|
||||
if (info->create && !source->context.data)
|
||||
if ((!info || info->create) && !source->context.data)
|
||||
blog(LOG_ERROR, "Failed to create source '%s'!", name);
|
||||
|
||||
blog(LOG_DEBUG, "%ssource '%s' (%s) created", private ? "private " : "",
|
||||
|
Loading…
x
Reference in New Issue
Block a user