From 71c0bddbc8b9a0fc2756dced7b2175003b356afc Mon Sep 17 00:00:00 2001 From: "Seungho, Baek" Date: Mon, 20 Jan 2020 16:34:04 +0900 Subject: [PATCH] [Tizen] Fix window cast crash issue Change-Id: I01eb0052ab6dc1b41617c38f051515cd80198293 Signed-off-by: Seungho, Baek --- dali/internal/window-system/common/window-impl.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 ) -- 2.7.4