These null checkes are slightly misleading when double-checking
mutability for external language interop. None of the functions in
these files allow the variable at hand to become `NULL` under normal
operation, because they are checked at initialization and never (allowed
to be) reassigned to `NULL`.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1615>
{
g_return_val_if_fail (GST_IS_VULKAN_COMMAND_POOL (pool), NULL);
- return pool->queue ? gst_object_ref (pool->queue) : NULL;
+ return gst_object_ref (pool->queue);
}
static GstVulkanCommandBuffer *
{
g_return_val_if_fail (GST_IS_VULKAN_DESCRIPTOR_POOL (pool), NULL);
- return pool->device ? gst_object_ref (pool->device) : NULL;
+ return gst_object_ref (pool->device);
}
/**
{
g_return_val_if_fail (GST_IS_VULKAN_DEVICE (device), NULL);
- return device->instance ? gst_object_ref (device->instance) : NULL;
+ return gst_object_ref (device->instance);
}
/**
{
g_return_val_if_fail (GST_IS_VULKAN_PHYSICAL_DEVICE (device), NULL);
- return device->instance ? gst_object_ref (device->instance) : NULL;
+ return gst_object_ref (device->instance);
}
static gboolean
{
g_return_val_if_fail (GST_IS_VULKAN_QUEUE (queue), NULL);
- return queue->device ? gst_object_ref (queue->device) : NULL;
+ return gst_object_ref (queue->device);
}
/**