summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2008-06-09 16:24:15 +0100
committerAlan Hourihane <[email protected]>2008-06-09 16:25:01 +0100
commit5cf69fe511a67a7bcf6787974becf6a143abb507 (patch)
treeb05312e8c84181ec54ad05d99f106f0a79ab2a70 /src
parent906e189bd362399f1ffc4d5421ae0d0abd586977 (diff)
Check for NULL pointer
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 6efdf4312a5..e2beae380ed 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -602,6 +602,8 @@ dri2CreateNewDrawable(__DRIscreen *screen, const __DRIconfig *config,
__DRIdrawable *pdraw;
pdraw = driCreateNewDrawable(screen, config, 0, 0, NULL, data);
+ if (!pdraw)
+ return NULL;
pdraw->dri2.drawable_id = drawable_id;
pdraw->dri2.tail = head;