don't crash if somehow a game gets opened without a dict

This commit is contained in:
Eric House 2014-09-30 21:20:47 -07:00
parent 8e9ca8603d
commit fa3a2c1c5e

View file

@ -518,9 +518,9 @@ static void
and_draw_dictChanged( DrawCtx* dctx, XP_S16 playerNum,
const DictionaryCtxt* dict )
{
XP_LOGF( "%s(dict=%p); code=%x", __func__, dict, andDictID(dict) );
AndDraw* draw = (AndDraw*)dctx;
if ( NULL != draw->jdraw ) {
if ( !!dict && !!draw->jdraw ) {
XP_LOGF( "%s(dict=%p); code=%x", __func__, dict, andDictID(dict) );
XP_LangCode code = 0; /* A null dict means no-lang */
if ( NULL != dict ) {
code = dict_getLangCode( dict );