mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
screen-cast/stream-src: Assert that dmabuf handle lookup succeeds
To prevent issues like the one fixed in the previous commit. Also remove a redundant variable assignment. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3326>
This commit is contained in:
parent
5809ef62f5
commit
8d3d8b86e5
@ -564,11 +564,11 @@ meta_screen_cast_stream_src_calculate_stride (MetaScreenCastStreamSrc *src,
|
||||
|
||||
if (spa_data->type == SPA_DATA_DmaBuf)
|
||||
{
|
||||
CoglDmaBufHandle *dmabuf_handle = NULL;
|
||||
CoglDmaBufHandle *dmabuf_handle;
|
||||
|
||||
dmabuf_handle = g_hash_table_lookup (priv->dmabuf_handles,
|
||||
GINT_TO_POINTER (spa_data->fd));
|
||||
if (dmabuf_handle)
|
||||
g_assert (dmabuf_handle != NULL);
|
||||
return cogl_dma_buf_handle_get_stride (dmabuf_handle);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user