Merge "Check window validity" into devel/master
authorHeeyong Song <heeyong.song@samsung.com>
Mon, 9 May 2022 00:59:26 +0000 (00:59 +0000)
committerGerrit Code Review <gerrit@review>
Mon, 9 May 2022 00:59:26 +0000 (00:59 +0000)
dali-toolkit/internal/text/text-controller-impl.cpp

index 46d83dd..47877c4 100644 (file)
@@ -540,7 +540,8 @@ Dali::LayoutDirection::Type Controller::Impl::GetLayoutDirection(Dali::Actor& ac
   if(mModel->mMatchLayoutDirection == DevelText::MatchLayoutDirection::LOCALE ||
      (mModel->mMatchLayoutDirection == DevelText::MatchLayoutDirection::INHERIT && !mIsLayoutDirectionChanged))
   {
-    return static_cast<Dali::LayoutDirection::Type>(DevelWindow::Get(actor).GetRootLayer().GetProperty(Dali::Actor::Property::LAYOUT_DIRECTION).Get<int>());
+    Window window = DevelWindow::Get(actor);
+    return static_cast<Dali::LayoutDirection::Type>(window ? window.GetRootLayer().GetProperty(Dali::Actor::Property::LAYOUT_DIRECTION).Get<int>() : LayoutDirection::LEFT_TO_RIGHT);
   }
   else
   {