diff options
author | Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> | 2014-05-12 11:01:48 +0300 |
---|---|---|
committer | Tapani Pälli <tapani.palli@intel.com> | 2014-05-30 07:22:01 +0300 |
commit | 7bfe94694cc270f877b2d192b0e20762987ae7c9 (patch) | |
tree | 57a5c1469954e2b2e24a730aa52f8e3c895a6f81 /src/mesa/main/performance_monitor.c | |
parent | 5c9056d37f0143eb4c2fe01365b0e6531378ffac (diff) | |
download | external_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.c | 5 |
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; |