sighhh add more calloc checks
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 14 Jan 2011 06:35:41 +0000 (06:35 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 14 Jan 2011 06:35:41 +0000 (06:35 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@56100 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/evas_font_draw.c

index 6adcb18..6067f92 100644 (file)
@@ -125,8 +125,10 @@ _fash_int_add(Fash_Int *fash, int item, RGBA_Font_Int *fint, int index)
    min = item & 0xff;
    if (!fash->bucket[grp])
      fash->bucket[grp] = calloc(1, sizeof(Fash_Int_Map2));
+   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]);
    if (!fash->bucket[grp]->bucket[maj])
      fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Int_Map));
+   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]);
    fash->bucket[grp]->bucket[maj]->item[min].fint = fint;
    fash->bucket[grp]->bucket[maj]->item[min].index = index;
 }
@@ -182,6 +184,7 @@ _fash_gl_add(Fash_Glyph *fash, int item, RGBA_Font_Glyph *glyph)
    min = item & 0xff;
    if (!fash->bucket[grp])
      fash->bucket[grp] = calloc(1, sizeof(Fash_Glyph_Map2));
+   EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]);
    if (!fash->bucket[grp]->bucket[maj])
      fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Glyph_Map));
    EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]);