vkimagememory: actually check the length of a ptr array
authorMatthew Waters <matthew@centricular.com>
Fri, 29 May 2020 12:17:24 +0000 (22:17 +1000)
committerMatthew Waters <matthew@centricular.com>
Tue, 2 Jun 2020 03:58:13 +0000 (13:58 +1000)
Not it's value is > 0 which should always be true.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1314>

gst-libs/gst/vulkan/gstvkimagememory.c

index b47c480..711df1c 100644 (file)
@@ -414,7 +414,7 @@ _vk_image_mem_free (GstAllocator * allocator, GstMemory * memory)
   GST_CAT_TRACE (GST_CAT_VULKAN_IMAGE_MEMORY, "freeing image memory:%p "
       "id:%" G_GUINT64_FORMAT, mem, (guint64) mem->image);
 
-  g_warn_if_fail (mem->outstanding_views > 0);
+  g_warn_if_fail (mem->outstanding_views->len == 0);
   g_ptr_array_unref (mem->outstanding_views);
 
   g_ptr_array_foreach (mem->views, (GFunc) _free_view, NULL);