From 42d525e15b9ed3e8ad053def6de5fc167a98fbff Mon Sep 17 00:00:00 2001 From: Yeongjong Lee Date: Fri, 31 Jul 2020 06:44:44 +0000 Subject: [PATCH] evas_textblock: remove logically dead code Since `c->fmt` is allocated and dereferenced in `_layoutformat_push`, if `c->fmt` is NULL, this causes a crash before checking for NULL. Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D12076 --- src/lib/evas/canvas/evas_object_textblock.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index b8541b3949..4c6fc865d8 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -7668,10 +7668,6 @@ _layout_setup(Ctxt *c, const Eo *eo_obj, Evas_Coord w, Evas_Coord h) { c->fmt = _layout_format_push(c, o->main_fmt, NULL); } - if (!c->fmt) - { - return EINA_FALSE; - } c->paragraphs = o->paragraphs;