From: Sangjin Kim Date: Mon, 10 Sep 2012 05:11:20 +0000 (+0900) Subject: [Title] Bug fix for T_SDK-127 emulator crash issue. X-Git-Tag: TizenStudio_2.0_p2.3~1312^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=553fd2781e04fdba4adf010ee78e2513a39914d5;p=sdk%2Femulator%2Fqemu.git [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] --- 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; }