Browse Source

Fix NULL pointer dereference with text lookups

jp9000 11 years ago
parent
commit
57dcf49757
1 changed files with 3 additions and 1 deletions
  1. 3 1
      libobs/util/text-lookup.c

+ 3 - 1
libobs/util/text-lookup.c

@@ -409,5 +409,7 @@ void text_lookup_destroy(lookup_t lookup)
 bool text_lookup_getstr(lookup_t lookup, const char *lookup_val,
 		const char **out)
 {
-	return lookup_getstring(lookup_val, out, lookup->top);
+	if (lookup)
+		return lookup_getstring(lookup_val, out, lookup->top);
+	return false;
 }