From 0faefb194e58ebd6a58c9ce2d00be286b8746613 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 27 May 2010 12:30:45 -0600 Subject: [PATCH] sw/xlib: avoid dereferencing a null pointer --- src/gallium/winsys/sw/xlib/xlib_sw_winsys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c b/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c index 3d702ae08dc..b78f537c125 100644 --- a/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c +++ b/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c @@ -255,7 +255,7 @@ xm_displaytarget_destroy(struct sw_winsys *ws, } else { FREE(xm_dt->data); - if (xm_dt->tempImage->data == xm_dt->data) { + if (xm_dt->tempImage && xm_dt->tempImage->data == xm_dt->data) { xm_dt->tempImage->data = NULL; } xm_dt->data = NULL; -- 2.30.2