diff --git a/ext/vulkan/vkdevice.c b/ext/vulkan/vkdevice.c index 5c2b279ef2..1f7aad81a6 100644 --- a/ext/vulkan/vkdevice.c +++ b/ext/vulkan/vkdevice.c @@ -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;