]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/text.cpp
Ensure Text always has at least one line
[libs/gltk.git] / source / text.cpp
index a3ed762a2cd560754dcd973094e547d5977eae20..86730757fd6c93889b772ac648bbcd4913a98c85 100644 (file)
@@ -25,7 +25,14 @@ struct Text::CoordsToGeomData
 
 Text::Text():
        style(0)
-{ }
+{
+       Line line;
+       line.start = 0;
+       line.bytes = 0;
+       line.length = 0;
+       line.width = 0;
+       lines.push_back(line);
+}
 
 Text::Text(const Style &s, const string &t):
        style(&s)