XDamageDestroy is called before use_damage is tested. This crashes on my
authorSam Lantinga <slouken@libsdl.org>
Mon, 27 Sep 2010 00:49:56 -0700
changeset 4898 164bee619400
parent 4897 c3eb55210a90
child 4899 5d529386db73
XDamageDestroy is called before use_damage is tested. This crashes on my setup. The patch calls XDamageDestroy only when use_damage is true. Kind regards, André
src/video/x11/SDL_x11render.c
--- a/src/video/x11/SDL_x11render.c	Mon Sep 27 00:49:34 2010 -0700
+++ b/src/video/x11/SDL_x11render.c	Mon Sep 27 00:49:56 2010 -0700
@@ -691,8 +691,8 @@
             return -1;
         }
 #ifdef SDL_VIDEO_DRIVER_X11_XDAMAGE
-        XDamageDestroy(data->display, data->stencil_damage);
         if (data->use_xdamage) {
+            XDamageDestroy(data->display, data->stencil_damage);
             data->stencil_damage =
                 XDamageCreate(data->display, data->stencil, XDamageReportNonEmpty);
             if (!data->stencil_damage) {