Bläddra i källkod

libobs: Fix crash if missing plugin for a source

I forgot that the info variable may be intentionally NULL if a source's
plugin in missing.
jp9000 10 år sedan
förälder
incheckning
e14050bbe1
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      libobs/obs-source.c

+ 1 - 1
libobs/obs-source.c

@@ -191,7 +191,7 @@ obs_source_t *obs_source_create(enum obs_source_type type, const char *id,
 	blog(LOG_INFO, "source '%s' (%s) created", name, id);
 	obs_source_dosignal(source, "source_create", NULL);
 
-	if (info->type == OBS_SOURCE_TYPE_TRANSITION)
+	if (info && info->type == OBS_SOURCE_TYPE_TRANSITION)
 		os_atomic_inc_long(&obs->data.active_transitions);
 	return source;