[Tizen] Check window validity
authorTaehyub Kim <taehyub.kim@samsung.com>
Tue, 3 May 2022 08:16:53 +0000 (17:16 +0900)
committerTaehyub Kim <taehyub.kim@samsung.com>
Tue, 3 May 2022 08:16:53 +0000 (17:16 +0900)
This reverts commit a1cbc0dee7e754907787e00217dd76b33430f85f.

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
   {