[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)
committerSangjin Kim <sangjin3.kim@samsung.com>
Mon, 10 Sep 2012 05:11:20 +0000 (14:11 +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 38cd262..ab51323 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 cc65d8c..ae10dc0 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 18bc96c..31fb74c 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 4223675..55f5933 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;
 }