gltestsrc: don't dereference null pointer

funcs can be NULL, it is one of the two conditions of the OR statement
above, so confirm it isn't before dereferencing with funcs->free.

CID 1358388
This commit is contained in:
Luis de Bethencourt 2016-04-12 11:14:22 +01:00
parent d6ea4d83f2
commit 43a656b296

View file

@ -740,7 +740,7 @@ gst_gl_test_src_callback (gpointer stuff)
funcs = src->src_funcs;
if (!funcs || src->set_pattern != src->active_pattern) {
if (src->src_impl)
if (src->src_impl && funcs)
funcs->free (src->src_impl);
src->src_funcs = funcs =
gst_gl_test_src_get_src_funcs_for_pattern (src->set_pattern);