From b5df4537a9ef5f30c28dca4dcf263312f492f037 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 11 Jun 2016 11:39:18 -0700 Subject: [PATCH] libobs: Fix null pointer dereference w/ null private sources --- libobs/obs-source.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libobs/obs-source.c b/libobs/obs-source.c index 634f7a4b4..81591eabf 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -2599,7 +2599,8 @@ void obs_source_set_name(obs_source_t *source, const char *name) if (!obs_source_valid(source, "obs_source_set_name")) return; - if (!name || !*name || strcmp(name, source->context.name) != 0) { + if (!name || !*name || !source->context.name || + strcmp(name, source->context.name) != 0) { struct calldata data; char *prev_name = bstrdup(source->context.name); obs_context_data_setname(&source->context, name);