changeset 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 c3eb55210a90
children 5d529386db73
files src/video/x11/SDL_x11render.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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) {