mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
shm: remove wl_shm_buffer.pool NULL checks
wl_shm_buffer.pool is never set to NULL. The only time it's set is in shm_pool_create_buffer, and the pool is guaranteed to be non-NULL there. Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
parent
abcf1048e2
commit
ba0c63dee8
1 changed files with 1 additions and 7 deletions
|
|
@ -124,8 +124,7 @@ destroy_buffer(struct wl_resource *resource)
|
|||
{
|
||||
struct wl_shm_buffer *buffer = wl_resource_get_user_data(resource);
|
||||
|
||||
if (buffer->pool)
|
||||
shm_pool_unref(buffer->pool, false);
|
||||
shm_pool_unref(buffer->pool, false);
|
||||
free(buffer);
|
||||
}
|
||||
|
||||
|
|
@ -400,11 +399,6 @@ wl_shm_buffer_get_stride(struct wl_shm_buffer *buffer)
|
|||
WL_EXPORT void *
|
||||
wl_shm_buffer_get_data(struct wl_shm_buffer *buffer)
|
||||
{
|
||||
assert(buffer->pool);
|
||||
|
||||
if (!buffer->pool)
|
||||
return NULL;
|
||||
|
||||
if (buffer->pool->external_refcount &&
|
||||
(buffer->pool->size != buffer->pool->new_size))
|
||||
wl_log("Buffer address requested when its parent pool "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue