From 7bfe94694cc270f877b2d192b0e20762987ae7c9 Mon Sep 17 00:00:00 2001 From: Juha-Pekka Heikkila Date: Mon, 12 May 2014 11:01:48 +0300 Subject: mesa/main: Add missing null check in _mesa_CreatePerfQueryINTEL() Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Petri Latvala --- src/mesa/main/performance_monitor.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/main/performance_monitor.c') diff --git a/src/mesa/main/performance_monitor.c b/src/mesa/main/performance_monitor.c index 21b9423e003..9d1a6b4d807 100644 --- a/src/mesa/main/performance_monitor.c +++ b/src/mesa/main/performance_monitor.c @@ -1036,6 +1036,11 @@ _mesa_CreatePerfQueryINTEL(GLuint queryId, GLuint *queryHandle) } m = new_performance_monitor(ctx, first); + if (m == NULL) { + _mesa_error_no_memory(__func__); + return; + } + _mesa_HashInsert(ctx->PerfMonitor.Monitors, first, m); *queryHandle = first; -- cgit v1.2.3