diff --git a/xwords4/android/XWords4/jni/utilwrapper.c b/xwords4/android/XWords4/jni/utilwrapper.c index f1860be01..aa3c3c58c 100644 --- a/xwords4/android/XWords4/jni/utilwrapper.c +++ b/xwords4/android/XWords4/jni/utilwrapper.c @@ -249,15 +249,15 @@ and_util_turnChanged(XW_UtilCtxt* uc) static void and_util_informMove( XW_UtilCtxt* uc, XWStreamCtxt* expl, XWStreamCtxt* words ) { - if ( !!words ) { - UTIL_CBK_HEADER( "informMove", "(Ljava/lang/String;Ljava/lang/String;)V" ); - jstring jexpl = streamToJString( env, expl ); - jstring jwords = streamToJString( env, words ); - (*env)->CallVoidMethod( env, util->jutil, mid, jexpl, jwords ); - (*env)->DeleteLocalRef( env, jexpl ); + UTIL_CBK_HEADER( "informMove", "(Ljava/lang/String;Ljava/lang/String;)V" ); + jstring jexpl = streamToJString( env, expl ); + jstring jwords = !!words ? streamToJString( env, words ) : NULL; + (*env)->CallVoidMethod( env, util->jutil, mid, jexpl, jwords ); + (*env)->DeleteLocalRef( env, jexpl ); + if ( !!jwords ) { (*env)->DeleteLocalRef( env, jwords ); - UTIL_CBK_TAIL(); } + UTIL_CBK_TAIL(); } static void diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java index c7a240d93..f00b8eaac 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java @@ -1396,7 +1396,7 @@ public class BoardActivity extends XWActivity { m_dlgBytes = expl; m_dlgTitle = R.string.info_title; - m_words = wordsToArray( words ); + m_words = null == words? null : wordsToArray( words ); waitBlockingDialog( DLG_SCORES_BLK, 0 ); }