From 35f14c47e217ab020b24f309b96e19db8e843498 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 17 Aug 2010 17:55:48 +0000 Subject: [PATCH] Evas textblock: render should be allowed to be passed an object with no paragraphs, but should just return and do nothing. SVN revision: 51263 --- legacy/evas/src/lib/canvas/evas_object_textblock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c index 20030d31d7..2af9018a4f 100644 --- a/legacy/evas/src/lib/canvas/evas_object_textblock.c +++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c @@ -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() \ } \ }