summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/performance_monitor.c5
1 files changed, 5 insertions, 0 deletions
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;