From 96f6eacfc931cc8028f24d678a707a644ecd0e37 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Dalleau?= Date: Tue, 20 Aug 2013 16:09:40 +0200 Subject: [PATCH] VirtGL: Fix TDIS-7153 Emulator crashed with WebGL Conformance test This fix allows some of WebGL test to pass without crashing the emulator. --- tizen/src/hw/opengl_exec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tizen/src/hw/opengl_exec.c b/tizen/src/hw/opengl_exec.c index df118cec36..064fd9ad58 100644 --- a/tizen/src/hw/opengl_exec.c +++ b/tizen/src/hw/opengl_exec.c @@ -526,7 +526,7 @@ static char *compute_gl_extensions() { static inline QGloSurface *get_qsurface_from_client_drawable(GLState *state, ClientGLXDrawable client_drawable) { QGloSurface *qsurface; - if(state->current_qsurface->client_drawable == client_drawable) + if (state->current_qsurface && state->current_qsurface->client_drawable == client_drawable) return state->current_qsurface; QTAILQ_FOREACH(qsurface, &state->qsurfaces, next) { @@ -1604,7 +1604,8 @@ int do_function_call(ProcessState *process, int func_number, unsigned long *args // We have to assume the current context here // since we assume that a drawable must belong to a specific context - render_surface(qsurface, bpp, stride, render_buffer); + if (qsurface) + render_surface(qsurface, bpp, stride, render_buffer); break; } -- 2.34.1