From: Alan Hourihane Date: Wed, 16 Jun 2010 16:55:00 +0000 (+0100) Subject: draw: add alloc check X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=51729b5119df450f2f80c4e648b99fa35b9ec32d;p=mesa.git draw: add alloc check --- diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index bd5d8853cf8..9117c1303dc 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -173,6 +173,8 @@ draw_llvm_create(struct draw_context *draw) #endif llvm = CALLOC_STRUCT( draw_llvm ); + if (!llvm) + return NULL; llvm->draw = draw; llvm->engine = draw->engine;