summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-07-19 15:57:17 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-07-19 15:57:17 -0400
commitc0ec5d78d4f374401a49c0ead2f34b0e02a4b032 (patch)
tree57e681d0ce075b8146f26f4a7a646d6aee908f7c
parent6f790536a7538f0b1f92a1dd92b8c290daabe3ca (diff)
downloadefl-devs/discomfitor/w.tar.gz
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_dmabuf.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
index 43f78c8a20..63e54a4999 100644
--- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
@@ -566,17 +566,20 @@ _evas_dmabuf_surface_reconfigure(Surface *s, int w, int h, uint32_t flags EINA_U
surface = s->surf.dmabuf;
for (i = 0; i < surface->nbuf; i++)
{
- Dmabuf_Buffer *b = surface->buffer[i];
- int stride = b->stride;
-
- /* If stride is a little bigger than width we still fit */
- if (!force && (w >= b->w) && (w <= stride / 4) && (h == b->h))
+ if (surface->buffer[i])
{
- b->w = w;
- continue;
- }
+ Dmabuf_Buffer *b = surface->buffer[i];
+ int stride = b->stride;
- _evas_dmabuf_buffer_destroy(b);
+ /* If stride is a little bigger than width we still fit */
+ if (!force && (w >= b->w) && (w <= stride / 4) && (h == b->h))
+ {
+ b->w = w;
+ continue;
+ }
+
+ _evas_dmabuf_buffer_destroy(b);
+ }
buf = _evas_dmabuf_buffer_init(surface, w, h);
surface->buffer[i] = buf;
if (!buf)