shm: width/height must match

This commit is contained in:
Daniel Eklöf 2019-06-12 20:17:35 +02:00
parent eafd5b26d3
commit 68108ad7d8
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

3
shm.c
View file

@ -30,6 +30,9 @@ struct buffer *
shm_get_buffer(struct wl_shm *shm, int width, int height)
{
tll_foreach(buffers, it) {
if (it->item.width != width || it->item.height != height)
continue;
if (!it->item.busy) {
it->item.busy = true;
return &it->item;