From: Seungho, Baek Date: Mon, 20 Jan 2020 07:34:04 +0000 (+0900) Subject: [Tizen] Fix window cast crash issue X-Git-Tag: accepted/tizen/5.5/unified/20200121.041227^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F05%2F222805%2F2;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git [Tizen] Fix window cast crash issue Change-Id: I01eb0052ab6dc1b41617c38f051515cd80198293 Signed-off-by: Seungho, Baek --- diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index 7721cce..65420f1 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -853,10 +853,14 @@ Dali::Window Window::Get( Dali::Actor actor ) if ( Internal::Adaptor::Adaptor::IsAvailable() ) { Dali::Internal::Adaptor::Adaptor& adaptor = Internal::Adaptor::Adaptor::GetImplementation( Internal::Adaptor::Adaptor::Get() ); - windowImpl = static_cast( adaptor.GetWindow( actor ) ); + windowImpl = dynamic_cast( adaptor.GetWindow( actor ) ); + if( windowImpl ) + { + return Dali::Window( windowImpl ); + } } - return Dali::Window( windowImpl ); + return Dali::Window(); } void Window::SetParent( Dali::Window& parent )