fix prevent bugs
authorSukwon Suh <sukwon.suh@samsung.com>
Wed, 3 Apr 2013 02:26:36 +0000 (11:26 +0900)
committerSukwon Suh <sukwon.suh@samsung.com>
Wed, 3 Apr 2013 02:26:36 +0000 (11:26 +0900)
Change-Id: Ieb2fbebabc07a5f25da4ac1fa5c8c8b74a64fadb
Signed-off-by: Sukwon Suh <sukwon.suh@samsung.com>
src/graphics/opengl/FGrpEgl.cpp

index 80d143d..0a19cd8 100644 (file)
@@ -465,10 +465,7 @@ _OnBoundsChanged(void* pData)
        }
        else
        {
-               if (pSglInfo->pVisualElement != null)
-               {
-                       pSglInfo->pVisualElement->SetSurface(pVisualElementSurface);
-               }
+               pSglInfo->pVisualElement->SetSurface(pVisualElementSurface);
        }
 
        pSglInfo->pBitmap = bitmap.release();
@@ -1171,7 +1168,12 @@ _SglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType wi
                SysTryReturn(NID_GRP, pVisualElementSurface != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating.");
 
                _VisualElementSurfaceImpl* pVisualElementSurfaceImpl = _VisualElementSurfaceImpl::GetInstance(*pVisualElementSurface);
-               SysTryReturn(NID_GRP, pVisualElementSurfaceImpl != null, EGL_NO_SURFACE, E_OPERATION_FAILED, "Propagating.");
+               if (pVisualElementSurfaceImpl == null)
+               {
+                       SysLogException(NID_GRP, E_OPERATION_FAILED, "Propagating.");
+                       delete pVisualElementSurface;
+                       return EGL_NO_SURFACE;
+               }
 
                Evas_Object* pObject = (Evas_Object*)pVisualElementSurfaceImpl->GetNativeHandle();
                delete pVisualElementSurface;