vulkansink: Fix null pointer exception

context query might happen before creating swapper.
This commit is contained in:
Seungha Yang 2019-12-23 15:17:07 +09:00 committed by Sebastian Dröge
parent a1584b6f99
commit b8ef3801bc

View file

@ -231,7 +231,8 @@ gst_vulkan_sink_query (GstBaseSink * bsink, GstQuery * query)
if (gst_vulkan_handle_context_query (GST_ELEMENT (vk_sink), query,
vk_sink->display, vk_sink->instance, vk_sink->device))
return TRUE;
if (gst_vulkan_queue_handle_context_query (GST_ELEMENT (vk_sink), query,
if (vk_sink->swapper &&
gst_vulkan_queue_handle_context_query (GST_ELEMENT (vk_sink), query,
vk_sink->swapper->queue))
return TRUE;