From 2c3ea4af5513bebf73d6a1775eb111073ae03097 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 25 Aug 2019 19:12:46 -0700 Subject: [PATCH] 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. --- libobs/obs-source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libobs/obs-source.c b/libobs/obs-source.c index b622862ad..dd69dbcf4 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -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 " : "",