TextLayout fix.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / layouts / layout-engine.cpp
index 89b6f5b..a5da5a4 100644 (file)
@@ -852,7 +852,7 @@ struct LayoutEngine::Impl
     Vector<LineRun> newLines;
 
     // Estimate the number of lines.
-    Length linesCapacity = layoutParameters.estimatedNumberOfLines;
+    Length linesCapacity = std::max( 1u, layoutParameters.estimatedNumberOfLines );
     Length numberOfLines = 0u;
 
     if( updateCurrentBuffer )