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
This commit is contained in:
Derek Foreman 2017-10-24 13:57:00 -05:00
parent aee4c2ef73
commit 680b7b485d
1 changed files with 5 additions and 0 deletions

View File

@ -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;