evas_textblock: remove logically dead code
authorYeongjong Lee <yj34.lee@samsung.com>
Fri, 31 Jul 2020 06:44:44 +0000 (06:44 +0000)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 2 Aug 2020 22:00:22 +0000 (07:00 +0900)
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 <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D12076

src/lib/evas/canvas/evas_object_textblock.c

index 20a8558..66c8df1 100644 (file)
@@ -7930,10 +7930,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;