summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gui/skin/font.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Gui/skin/font.c b/Gui/skin/font.c
index fdeaf234fc..20e588c579 100644
--- a/Gui/skin/font.c
+++ b/Gui/skin/font.c
@@ -176,6 +176,7 @@ txSample * fntRender( wItem * item,int px,char * fmt,... )
item->Bitmap.Height=item->height=fntTextHeight( id,p );
item->Bitmap.Width=iw;
item->Bitmap.ImageSize=item->height * iw * 4;
+ if ( !item->Bitmap.ImageSize ) return NULL;
item->Bitmap.BPP=32;
item->Bitmap.Image=malloc( item->Bitmap.ImageSize );
}