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é
This commit is contained in:
Sam Lantinga
2010-09-27 00:49:56 -07:00
parent 7298ad2a68
commit 1f15b05e7e

View File

@@ -691,8 +691,8 @@ X11_DisplayModeChanged(SDL_Renderer * renderer)
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) {