[Tizen] Fix crash if bidirectional lines info not found during ellipsis 86/313586/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Thu, 27 Jun 2024 06:22:55 +0000 (15:22 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Fri, 28 Jun 2024 06:34:23 +0000 (15:34 +0900)
Change-Id: Id08510b1eb83493880668b003cac17b2b6736a49
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-toolkit/internal/text/layouts/layout-engine.cpp

index d27527e..2735d7a 100644 (file)
@@ -1324,7 +1324,7 @@ struct Engine::Impl
         }
       }
 
-      const BidirectionalLineInfoRun* const bidirectionalLineInfo = (layoutBidiParameters.isBidirectional && !bidirectionalLinesInfo.Empty()) ? &bidirectionalLinesInfo[layoutBidiParameters.bidiLineIndex] : nullptr;
+      const BidirectionalLineInfoRun* const bidirectionalLineInfo = (layoutBidiParameters.isBidirectional && (layoutBidiParameters.bidiLineIndex < bidirectionalLinesInfo.Count())) ? &bidirectionalLinesInfo[layoutBidiParameters.bidiLineIndex] : nullptr;
 
       if((nullptr != bidirectionalLineInfo) &&
          !bidirectionalLineInfo->isIdentity &&