evas/textblock - null check format.
authorChunEon Park <hermet@hermet.pe.kr>
Wed, 28 May 2014 05:07:20 +0000 (14:07 +0900)
committerChunEon Park <hermet@hermet.pe.kr>
Wed, 28 May 2014 05:09:34 +0000 (14:09 +0900)
logically it's insane that it doesn't check the null there but it checks right next line.

src/lib/evas/canvas/evas_object_textblock.c

index bc0430d..7fd659b 100644 (file)
@@ -10276,8 +10276,11 @@ _size_native_calc_line_finalize(const Evas_Object *eo_obj, Eina_List *items,
         Evas_Coord asc = 0, desc = 0;
         /* If there are no text items yet, calc ascent/descent
          * according to the current format. */
-        _layout_item_ascent_descent_adjust(eo_obj, &asc, &desc,
-              it, it->format);
+        if (it->format)
+          {
+             _layout_item_ascent_descent_adjust(eo_obj, &asc, &desc,
+                                                it, it->format);
+          }
 
         if (asc > *ascent)
            *ascent = asc;