[dali_2.3.24] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / bounded-paragraph-helper-functions.cpp
index 7b207f4..219f7bf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -167,6 +167,10 @@ void MergeBoundedParagraphRunsWhenRemoveCharacters(const Vector<Character>&
       boundedParagraphRuns.Remove(paragraphToDelete);
 
       numberOfRuns--;
+      if(lastRunIndexToUpdate == 0u)
+      {
+        break;
+      }
       lastRunIndexToUpdate--;
 
       continue;