edje - fix check return of _edje_fetch
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 28 Sep 2017 02:30:28 +0000 (11:30 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 28 Sep 2017 06:28:00 +0000 (15:28 +0900)
fixes CID 1381326

src/lib/edje/edje_calc.c

index 1500ab0..3902ac4 100644 (file)
@@ -840,11 +840,12 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
                  (((pmin->w == pmax->w) && (pmin->h == pmax->h) && (pmin->w > 0) && (pmin->h > 0)) &&
                   (((min->w != max->w) || (min->h != max->h) || (min->w <= 0) || (min->h <= 0)))))
                {
-                  Edje *ted;
-
-                  ted = _edje_fetch(ep->typedata.swallow->swallowed_object);
-                  ted->recalc_call = ted->dirty = ted->recalc_hints = EINA_TRUE;
-                  _edje_recalc(ted);
+                  Edje *ted = _edje_fetch(ep->typedata.swallow->swallowed_object);
+                  if (ted)
+                    {
+                       ted->recalc_call = ted->dirty = ted->recalc_hints = EINA_TRUE;
+                       _edje_recalc(ted);
+                    }
                }
 
              edje_object_mirrored_set(ep->typedata.swallow->swallowed_object,