From 27b34b7f9c8ba9936ee38db06f22f18fcf04c826 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Tue, 26 Apr 2022 12:24:59 +0900 Subject: [PATCH] Check window validity Change-Id: I104882efa0cd8506388ddb92328adc4152cdc1b1 --- dali-toolkit/internal/text/text-controller-impl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dali-toolkit/internal/text/text-controller-impl.cpp b/dali-toolkit/internal/text/text-controller-impl.cpp index 46d83dd..47877c4 100644 --- a/dali-toolkit/internal/text/text-controller-impl.cpp +++ b/dali-toolkit/internal/text/text-controller-impl.cpp @@ -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(DevelWindow::Get(actor).GetRootLayer().GetProperty(Dali::Actor::Property::LAYOUT_DIRECTION).Get()); + Window window = DevelWindow::Get(actor); + return static_cast(window ? window.GetRootLayer().GetProperty(Dali::Actor::Property::LAYOUT_DIRECTION).Get() : LayoutDirection::LEFT_TO_RIGHT); } else { -- 2.7.4