From f956df853d51afd6a84cafa64d821137cc51e3bd Mon Sep 17 00:00:00 2001 From: Andy2 Date: Wed, 9 Feb 2011 06:17:38 -0800 Subject: [PATCH] return "" rather than null when there's no java class backing util -- common code is less likely to crash. --- xwords4/android/XWords4/jni/utilwrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/jni/utilwrapper.c b/xwords4/android/XWords4/jni/utilwrapper.c index 9a5c6bb23..7a955d682 100644 --- a/xwords4/android/XWords4/jni/utilwrapper.c +++ b/xwords4/android/XWords4/jni/utilwrapper.c @@ -317,7 +317,7 @@ and_util_makeEmptyDict( XW_UtilCtxt* uc ) static const XP_UCHAR* and_util_getUserString( XW_UtilCtxt* uc, XP_U16 stringCode ) { - XP_UCHAR* result = NULL; + XP_UCHAR* result = ""; UTIL_CBK_HEADER("getUserString", "(I)Ljava/lang/String;" ); int index = stringCode - 1; /* see LocalizedStrIncludes.h */ XP_ASSERT( index < VSIZE( util->userStrings ) );