vkdevice: only unref the gstcontext query if non-NULL

Fixes an assertion in make -C tests/check generic/states.check
This commit is contained in:
Matthew Waters 2016-10-05 11:37:04 +11:00
parent d37a2f13ee
commit 1b3de55eb1

View file

@ -544,12 +544,12 @@ gst_vulkan_device_run_context_query (GstElement * element,
gst_query_parse_context (query, &context);
if (context)
gst_context_get_vulkan_device (context, device);
gst_query_unref (query);
}
GST_DEBUG_OBJECT (element, "found device %p", *device);
gst_query_unref (query);
if (*device)
return TRUE;