fix crash when GPU disabled
authorSukwon Suh <sukwon.suh@samsung.com>
Fri, 12 Apr 2013 04:25:12 +0000 (13:25 +0900)
committerSukwon Suh <sukwon.suh@samsung.com>
Fri, 12 Apr 2013 04:25:12 +0000 (13:25 +0900)
Change-Id: I8281933e8b3e6a74c0fccbae0bfa15b796016e8f
Signed-off-by: Sukwon Suh <sukwon.suh@samsung.com>
project/src/GlesCanvasTexture.cpp

index bc8bf97..e6e7431 100644 (file)
@@ -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<unsigned int>(eglGetError())
                        , static_cast<unsigned int>(glGetError())