add calloc check to avoid null deref

SVN revision: 56098
This commit is contained in:
Mike Blumenkrantz 2011-01-14 06:28:40 +00:00
parent 447d2c91dc
commit 39eb62a758
1 changed files with 1 additions and 0 deletions

View File

@ -184,6 +184,7 @@ _fash_gl_add(Fash_Glyph *fash, int item, RGBA_Font_Glyph *glyph)
fash->bucket[grp] = calloc(1, sizeof(Fash_Glyph_Map2));
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]);
fash->bucket[grp]->bucket[maj]->item[min] = glyph;
}