From 553fd2781e04fdba4adf010ee78e2513a39914d5 Mon Sep 17 00:00:00 2001 From: Sangjin Kim Date: Mon, 10 Sep 2012 14:11:20 +0900 Subject: [PATCH] [Title] Bug fix for T_SDK-127 emulator crash issue. [Type] bug fix. [Module] opengl [Priority] [CQ#] T_SDK-127 [Redmine#] [Problem] emulator crash [Cause] gl context double free. [Solution] [TestCase] --- package/pkginfo.manifest | 2 +- tizen/src/hw/gloffscreen_glx.c | 2 +- tizen/src/hw/gloffscreen_wgl.c | 2 +- tizen/src/hw/gloffscreen_xcomposite.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index 38cd262..ab51323 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,4 +1,4 @@ -Version: 1.3.49 +Version: 1.3.50 Maintainer: Yeong-Kyoon Lee Source: emulator diff --git a/tizen/src/hw/gloffscreen_glx.c b/tizen/src/hw/gloffscreen_glx.c index cc65d8c..ae10dc0 100644 --- a/tizen/src/hw/gloffscreen_glx.c +++ b/tizen/src/hw/gloffscreen_glx.c @@ -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; } diff --git a/tizen/src/hw/gloffscreen_wgl.c b/tizen/src/hw/gloffscreen_wgl.c index 18bc96c..31fb74c 100644 --- a/tizen/src/hw/gloffscreen_wgl.c +++ b/tizen/src/hw/gloffscreen_wgl.c @@ -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; } diff --git a/tizen/src/hw/gloffscreen_xcomposite.c b/tizen/src/hw/gloffscreen_xcomposite.c index 4223675..55f5933 100644 --- a/tizen/src/hw/gloffscreen_xcomposite.c +++ b/tizen/src/hw/gloffscreen_xcomposite.c @@ -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; } -- 2.7.4