From: Alan Hourihane Date: Mon, 9 Jun 2008 15:24:15 +0000 (+0100) Subject: Check for NULL pointer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5cf69fe511a67a7bcf6787974becf6a143abb507;p=mesa.git Check for NULL pointer --- 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;