From a9cd6af3e5040c890e57dd91b7639f11cad4c490 Mon Sep 17 00:00:00 2001 From: Victor Cebollada Date: Wed, 11 May 2016 09:15:05 +0100 Subject: [PATCH] TextLayout fix. * Check the initial line capacity is not zero. Change-Id: Ib8a9daceb8eab7acea9cde3c925937e3bf3c2928 Signed-off-by: Victor Cebollada --- dali-toolkit/internal/text/layouts/layout-engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dali-toolkit/internal/text/layouts/layout-engine.cpp b/dali-toolkit/internal/text/layouts/layout-engine.cpp index 89b6f5b..a5da5a4 100644 --- a/dali-toolkit/internal/text/layouts/layout-engine.cpp +++ b/dali-toolkit/internal/text/layouts/layout-engine.cpp @@ -852,7 +852,7 @@ struct LayoutEngine::Impl Vector newLines; // Estimate the number of lines. - Length linesCapacity = layoutParameters.estimatedNumberOfLines; + Length linesCapacity = std::max( 1u, layoutParameters.estimatedNumberOfLines ); Length numberOfLines = 0u; if( updateCurrentBuffer ) -- 2.7.4