Evas textblock: Until we actually use it in charwrap, don't malloc line_breaks.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 5 May 2011 16:35:32 +0000 (16:35 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 5 May 2011 16:35:32 +0000 (16:35 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@59217 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index 7ac0161..3db2d8c 100644 (file)
@@ -3407,12 +3407,13 @@ _layout_visualize_par(Ctxt *c)
                         * do */
                        if (!line_breaks)
                          {
-                            size_t len =
-                               eina_ustrbuf_length_get(it->text_node->unicode);
-                            line_breaks = malloc(len);
                             /* Only relevant in those cases */
                             if (it->format->wrap_word || it->format->wrap_mixed)
                               {
+                                 size_t len =
+                                    eina_ustrbuf_length_get(
+                                          it->text_node->unicode);
+                                 line_breaks = malloc(len);
                                  set_linebreaks_utf32((const utf32_t *)
                                     eina_ustrbuf_string_get(
                                        it->text_node->unicode),