From 5505c435a20150e35bb2a6eda1e8e2c38b63468a Mon Sep 17 00:00:00 2001 From: ehouse Date: Wed, 14 Jan 2009 12:51:55 +0000 Subject: [PATCH] Don't pass new bitmaps struct to draw code uninitialized --- xwords4/common/boarddrw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xwords4/common/boarddrw.c b/xwords4/common/boarddrw.c index e0e7de4fa..9b2841c29 100644 --- a/xwords4/common/boarddrw.c +++ b/xwords4/common/boarddrw.c @@ -347,6 +347,7 @@ drawCell( BoardCtxt* board, XP_U16 col, XP_U16 row, XP_Bool skipBlanks ) XP_S16 owner = -1; XP_Bool invert = XP_FALSE; XP_Bitmaps bitmaps; + XP_Bitmaps* bptr = NULL; XP_UCHAR* textP = NULL; HintAtts hintAtts; CellFlags flags = CELL_NONE; @@ -386,6 +387,7 @@ drawCell( BoardCtxt* board, XP_U16 col, XP_U16 row, XP_Bool skipBlanks ) } else { if ( dict_faceIsBitmap( dict, tile ) ) { dict_getFaceBitmaps( dict, tile, &bitmaps ); + bptr = &bitmaps; } (void)dict_tilesToString( dict, &tile, 1, ch, sizeof(ch) ); textP = ch; @@ -409,8 +411,7 @@ drawCell( BoardCtxt* board, XP_U16 col, XP_U16 row, XP_Bool skipBlanks ) } #endif - success = draw_drawCell( board->draw, &cellRect, textP, - bitmaps.nBitmaps > 0? &bitmaps : NULL, + success = draw_drawCell( board->draw, &cellRect, textP, bptr, tile, owner, bonus, hintAtts, flags ); break; }