VirtGL: Fix BUG N_SE-47982
authorFrédéric Dalleau <frederic.dalleau@linux.intel.com>
Thu, 8 Aug 2013 08:08:10 +0000 (10:08 +0200)
committerjinhyung.jo <jinhyung.jo@samsung.com>
Wed, 11 Sep 2013 09:10:35 +0000 (18:10 +0900)
Opening http://www.ro.me/film in browser then press "Begin"
makes Tizen emulator crash.
The crash is due to SwapBuffers being called with non window
parameter and non current pixmap. This parameter is provided
in client application.

tizen/src/hw/opengl_exec.c

index 41cd7fd81535630675c3809d173d56f3b4fb3945..df118cec36dfbdc05d432691d25db5a048690cab 100644 (file)
@@ -1583,7 +1583,10 @@ 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
-            resize_surface(process, qsurface, (int)args[1], (int)args[2]);
+            if (qsurface)
+                resize_surface(process, qsurface, (int)args[1], (int)args[2]);
+            else
+                DEBUGF("%s Failed to find surface for client_drawable %p process %p ->current_state %p ->->current_surface %p\n", "_resize_surface_func", client_drawable, process, process->current_state, process->current_state->current_qsurface);
             break;
 
         }