sw/xlib: avoid dereferencing a null pointer
This commit is contained in:
parent
c3b62bc86c
commit
0faefb194e
|
@ -255,7 +255,7 @@ xm_displaytarget_destroy(struct sw_winsys *ws,
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
FREE(xm_dt->data);
|
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->tempImage->data = NULL;
|
||||||
}
|
}
|
||||||
xm_dt->data = NULL;
|
xm_dt->data = NULL;
|
||||||
|
|
Loading…
Reference in New Issue