From: Nikos Ntarmos Date: Thu, 28 May 2009 13:46:23 +0000 (+0300) Subject: XDestroyRegion(3) only for non-NULL regions X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=613a440fdca0b81d2b6c75eef167532d03a28a40;p=monky XDestroyRegion(3) only for non-NULL regions Signed-off-by: Nikos Ntarmos Signed-off-by: Brenden Matthews --- diff --git a/src/conky.c b/src/conky.c index e670cf4..a40e462 100644 --- a/src/conky.c +++ b/src/conky.c @@ -7239,7 +7239,8 @@ static void X11_destroy_window(void) XDamageDestroy(display, x11_stuff.damage); XFixesDestroyRegion(display, x11_stuff.region2); XFixesDestroyRegion(display, x11_stuff.part); - XDestroyRegion(x11_stuff.region); + if (x11_stuff.region) + XDestroyRegion(x11_stuff.region); x11_stuff.region = NULL; #endif /* HAVE_XDAMAGE */ destroy_window();