Check window validity 84/274684/1
authorHeeyong Song <heeyong.song@samsung.com>
Tue, 26 Apr 2022 03:24:59 +0000 (12:24 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Fri, 6 May 2022 03:16:29 +0000 (12:16 +0900)
Change-Id: I104882efa0cd8506388ddb92328adc4152cdc1b1

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))
   {
   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
   {
   }
   else
   {