From: Eunki, Hong Date: Wed, 24 Jul 2024 01:22:09 +0000 (+0900) Subject: Check SceneHolder validation if we call GetWindowIdFromActor X-Git-Tag: dali_2.3.34~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2460b83f7a818cc09a8e84c1ec4cdb407cb5d226;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Check SceneHolder validation if we call GetWindowIdFromActor Since SceneHolder destructor doesn't change child's SceneOn state directly, It might be possible that SceneHolder is destroyed but Scene is alive. To avoid this case, let we check the SceneHolder validation one more time. Change-Id: If442cfe725198d13b52a4a470134a83d51573326 Signed-off-by: Eunki, Hong --- diff --git a/dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.cpp b/dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.cpp index 330c4d9..b706cee 100644 --- a/dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.cpp +++ b/dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.cpp @@ -311,13 +311,17 @@ int GetWindowIdFromActor(Dali::Actor actor) if(actor.GetProperty(Dali::Actor::Property::CONNECTED_TO_SCENE)) { - Any nativeWindowHandle = Dali::Integration::SceneHolder::Get(actor).GetNativeHandle(); + auto sceneHolder = Dali::Integration::SceneHolder::Get(actor); + if(DALI_LIKELY(sceneHolder)) + { + Any nativeWindowHandle = sceneHolder.GetNativeHandle(); #ifdef ECORE_WAYLAND2 - windowId = ecore_wl2_window_id_get(AnyCast(nativeWindowHandle)); + windowId = ecore_wl2_window_id_get(AnyCast(nativeWindowHandle)); #else - windowId = ecore_wl_window_id_get(AnyCast(nativeWindowHandle)); + windowId = ecore_wl_window_id_get(AnyCast(nativeWindowHandle)); #endif + } } return windowId; @@ -1224,7 +1228,7 @@ bool InputMethodContextEcoreWl::SetInputPanelPositionAlign(int x, int y, Dali::I if(mIMFContext) { Ecore_IMF_Input_Panel_Align inputPanelAlign = ECORE_IMF_INPUT_PANEL_ALIGN_TOP_LEFT; - switch (align) + switch(align) { case Dali::InputMethodContext::InputPanelAlign::TOP_LEFT: {