vkimagememory: actually check the length of a ptr array

Not it's value is > 0 which should always be true.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1314>
This commit is contained in:
Matthew Waters 2020-05-29 22:17:24 +10:00
parent bafdade207
commit dd44bc3a2d

View 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);