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 <eunkiki.hong@samsung.com>
if(actor.GetProperty<bool>(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<Ecore_Wl2_Window*>(nativeWindowHandle));
+ windowId = ecore_wl2_window_id_get(AnyCast<Ecore_Wl2_Window*>(nativeWindowHandle));
#else
- windowId = ecore_wl_window_id_get(AnyCast<Ecore_Wl_Window*>(nativeWindowHandle));
+ windowId = ecore_wl_window_id_get(AnyCast<Ecore_Wl_Window*>(nativeWindowHandle));
#endif
+ }
}
return windowId;
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:
{