Fix svace issues
[platform/core/uifw/dali-adaptor.git] / adaptors / ecore / wayland / window-impl-ecore-wl.cpp
index 6f785d0..6a71e00 100644 (file)
@@ -211,7 +211,10 @@ struct Window::EventHandler
     if ( handler && handler->mWindow && transformEvent->output == ecore_wl_window_output_find( handler->mEcoreWindow ) )
     {
       ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( handler->mWindow->mSurface ) );
-      wlSurface->OutputTransformed();
+      if( wlSurface )
+      {
+        wlSurface->OutputTransformed();
+      }
     }
 
     return ECORE_CALLBACK_PASS_ON;
@@ -226,7 +229,10 @@ struct Window::EventHandler
     if ( handler && handler->mWindow && ignoreTransformEvent->win == handler->mEcoreWindow )
     {
       ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( handler->mWindow->mSurface ) );
-      wlSurface->OutputTransformed();
+      if( wlSurface )
+      {
+        wlSurface->OutputTransformed();
+      }
     }
 
     return ECORE_CALLBACK_PASS_ON;
@@ -877,7 +883,10 @@ bool Window::IsVisible() const
 void Window::RotationDone( int orientation, int width, int height )
 {
   ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
-  wlSurface->RequestRotation( orientation, width, height );
+  if( wlSurface )
+  {
+    wlSurface->RequestRotation( orientation, width, height );
+  }
 
   mAdaptor->SurfaceResizePrepare( Dali::Adaptor::SurfaceSize( width, height ) );
 
@@ -1461,7 +1470,10 @@ Dali::DevelWindow::WindowPosition Window::GetPosition()
 void Window::SetTransparency( bool transparent )
 {
   ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
-  wlSurface->SetTransparency( transparent );
+  if( wlSurface )
+  {
+    wlSurface->SetTransparency( transparent );
+  }
 }
 
 } // Adaptor