From 5cf69fe511a67a7bcf6787974becf6a143abb507 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Mon, 9 Jun 2008 16:24:15 +0100 Subject: [PATCH] Check for NULL pointer --- src/mesa/drivers/dri/common/dri_util.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.30.2