[Title] Bug fix for T_SDK-127 emulator crash issue.
authorSangjin Kim <sangjin3.kim@samsung.com>
Mon, 10 Sep 2012 05:11:20 +0000 (14:11 +0900)
committerjinhyung.jo <jinhyung.jo@samsung.com>
Tue, 11 Sep 2012 11:48:17 +0000 (20:48 +0900)
[Type] bug fix.
[Module] opengl
[Priority]
[CQ#] T_SDK-127
[Redmine#]
[Problem] emulator crash
[Cause] gl context double free.
[Solution]
[TestCase]

package/pkginfo.manifest
tizen/src/hw/gloffscreen_glx.c
tizen/src/hw/gloffscreen_wgl.c
tizen/src/hw/gloffscreen_xcomposite.c

index 38cd262749a2cb24e1a6a4710b02a3f3f3467bb2..ab51323663b7df5630fc203e8124a053ee1bb472 100644 (file)
@@ -1,4 +1,4 @@
-Version: 1.3.49
+Version: 1.3.50
 Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
 Source: emulator
 
index cc65d8cac00703538faca324cb1c6d71f36dc170..ae10dc0eef4477616985f270a8732cfcd65e3e9d 100644 (file)
@@ -223,7 +223,7 @@ static void glo_surface_try_alloc_xshm_image(GloSurface *surface) {
 /* Update the context in surface and free previous light-weight context */
 void glo_surface_update_context(GloSurface *surface, GloContext *context)
 {
-    if ( surface->context )
+    if ( surface->context && (surface->context->context == 0))
         qemu_free(surface->context);
     surface->context = context;
 }
index 18bc96c080bd3c5b304104ac6a9df4b0385915f3..31fb74c10f3a74f5c04fac3204e9317aed36c32a 100644 (file)
@@ -797,7 +797,7 @@ void glo_context_destroy(GloContext *context) {
 /* Update the context in surface and free previous light-weight context */
 void glo_surface_update_context(GloSurface *surface, GloContext *context)
 {
-    if ( surface->context )
+    if ( surface->context && !surface->context->hDC)
         g_free(surface->context);
     surface->context = context;
 }
index 4223675735e983dff31bfbc8e3dbc42ff63e548a..55f59339b04d05aa5cae12f2bffc799f66a0bb8a 100644 (file)
@@ -258,7 +258,7 @@ static void glo_surface_try_alloc_xshm_image(GloSurface *surface) {
 /* Update the context in surface and free previous light-weight context */
 void glo_surface_update_context(GloSurface *surface, GloContext *context)
 {
-    if ( surface->context )
+    if ( surface->context && (surface->context->context == 0))
         g_free(surface->context);
     surface->context = context;
 }