sw/xlib: avoid dereferencing a null pointer

This commit is contained in:
Brian Paul 2010-05-27 12:30:45 -06:00
parent c3b62bc86c
commit 0faefb194e
1 changed files with 1 additions and 1 deletions

View File

@ -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;