summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/performance_monitor.c
diff options
context:
space:
mode:
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>2014-05-12 11:01:48 +0300
committerTapani Pälli <tapani.palli@intel.com>2014-05-30 07:22:01 +0300
commit7bfe94694cc270f877b2d192b0e20762987ae7c9 (patch)
tree57a5c1469954e2b2e24a730aa52f8e3c895a6f81 /src/mesa/main/performance_monitor.c
parent5c9056d37f0143eb4c2fe01365b0e6531378ffac (diff)
downloadexternal_mesa3d-7bfe94694cc270f877b2d192b0e20762987ae7c9.zip
external_mesa3d-7bfe94694cc270f877b2d192b0e20762987ae7c9.tar.gz
external_mesa3d-7bfe94694cc270f877b2d192b0e20762987ae7c9.tar.bz2
mesa/main: Add missing null check in _mesa_CreatePerfQueryINTEL()
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'src/mesa/main/performance_monitor.c')
-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 21b9423..9d1a6b4 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;