Evas textblock: render should be allowed to be passed an object with no paragraphs...
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 17 Aug 2010 17:55:48 +0000 (17:55 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 17 Aug 2010 17:55:48 +0000 (17:55 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@51263 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index 20030d3..2af9018 100644 (file)
@@ -6788,6 +6788,10 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
    obj->layer->evas->engine.func->context_multiplier_unset(output,
                                                           context);
    clip = ENFN->context_clip_get(output, context, &cx, &cy, &cw, &ch);
+   /* If there are no paragraphs and thus there are no lines,
+    * there's nothing left to do. */
+   if (!o->paragraphs) return;
+
 #define ITEM_WALK() \
    EINA_INLIST_FOREACH(o->paragraphs->lines, ln) \
      { \
@@ -6818,7 +6822,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
                   if ((obj->cur.geometry.x + x + ln->x + it->x - it->inset) > (cx + cw + 20)) \
                     break; \
                }
-             
+
 #define ITEM_WALK_END() \
          } \
      }