From 7caef9da772038458a5245233dae00e1c6f7522d Mon Sep 17 00:00:00 2001 From: Sukwon Suh Date: Fri, 12 Apr 2013 13:25:12 +0900 Subject: [PATCH] fix crash when GPU disabled Change-Id: I8281933e8b3e6a74c0fccbae0bfa15b796016e8f Signed-off-by: Sukwon Suh --- project/src/GlesCanvasTexture.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/project/src/GlesCanvasTexture.cpp b/project/src/GlesCanvasTexture.cpp index bc8bf97..e6e7431 100644 --- a/project/src/GlesCanvasTexture.cpp +++ b/project/src/GlesCanvasTexture.cpp @@ -213,10 +213,10 @@ GlesCanvasTexture::OnAppInitializing(AppRegistry& appRegistry) TryCatch(__pForm != null, , "Allocation of GlesForm failed."); r = __pForm->Construct(FORM_STYLE_NORMAL); - TryCatch(!IsFailed(r), , "__pForm->Construct(FORM_STYLE_NORMAL) failed."); + TryCatch(!IsFailed(r), delete __pForm, "__pForm->Construct(FORM_STYLE_NORMAL) failed."); r = GetAppFrame()->GetFrame()->AddControl(*__pForm); - TryCatch(!IsFailed(r), , "GetAppFrame()->GetFrame()->AddControl(*__pForm) failed."); + TryCatch(!IsFailed(r), delete __pForm, "GetAppFrame()->GetFrame()->AddControl(*__pForm) failed."); __pForm->AddTouchEventListener(*__pForm); @@ -238,10 +238,6 @@ GlesCanvasTexture::OnAppInitializing(AppRegistry& appRegistry) return true; CATCH: - delete pAppFrame; - delete __pForm; - __pForm = null; - AppLog("eglError : %#x glError : %#x VENDOR : %s GL_RENDERER : %s GL_VERSION : %s" , static_cast(eglGetError()) , static_cast(glGetError()) -- 2.7.4