From 680b7b485dc43670521320150821942f90d4470a Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 24 Oct 2017 13:57:00 -0500 Subject: [PATCH] Fix xwayland related crash when mousing out of a window XWayland likes to set a buffer on the cursor surface then delete it before we release it. I'm pretty sure when a client does that we're within spec to just kill it, but users will likely find this response ungratifying. So, instead, just gracefully fail to render the undefined surface. @ref T5593 --- src/bin/e_pixmap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c index fa3cbfa31..346b2726a 100644 --- a/src/bin/e_pixmap.c +++ b/src/bin/e_pixmap.c @@ -897,6 +897,11 @@ e_pixmap_image_refresh(E_Pixmap *cp) if (cp->held_buffer) _e_pixmap_wayland_image_clear(cp); + /* This catches the case where a client (*cough* xwayland) + * deletes a buffer we haven't released + */ + if (!cp->buffer) return EINA_FALSE; + if (!cp->buffer->shm_buffer) return EINA_TRUE; cp->held_buffer = cp->buffer;