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

index 142e45a..8973ffc 100644 (file)
@@ -193,10 +193,10 @@ GlesVideoTexture::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.");
 
        TryCatch(InitEGL(), , "InitEGL() failed.");
 
@@ -216,10 +216,6 @@ GlesVideoTexture::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())