diff src/video/x11/SDL_x11render.c @ 4898:164bee619400

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é
author Sam Lantinga <slouken@libsdl.org>
date Mon, 27 Sep 2010 00:49:56 -0700
parents 100f7ab48946
children aa8888658021
line wrap: on
line diff
--- 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) {