From a96afb2892bd9804e815cd94f47a3f9f54a15d47 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 11 Jul 2015 17:30:43 -0700 Subject: [PATCH] fix NPE rematching standalone games --- .../android/xw4/GamesListDelegate.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java index 417a3b98a..2049ffbb0 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java @@ -2260,18 +2260,19 @@ public class GamesListDelegate extends ListDelegateBase { Intent intent = null; if ( XWApp.REMATCH_SUPPORTED ) { - DbgUtils.logf( "makeRematchIntent(btAddr=%s; phone=%s)", btAddr, phone ); intent = makeSelfIntent( context ); intent.putExtra( REMATCH_ROWID_EXTRA, rowid ); - intent.putExtra( REMATCH_ADDRS_EXTRA, addrTypes.toInt() ); - if ( null != btAddr ) { - intent.putExtra( REMATCH_BTADDR_EXTRA, btAddr ); - } - if ( null != phone ) { - intent.putExtra( REMATCH_PHONE_EXTRA, phone ); - } - if ( null != relayID ) { - intent.putExtra( REMATCH_RELAYID_EXTRA, relayID ); + if ( null != addrTypes ) { + intent.putExtra( REMATCH_ADDRS_EXTRA, addrTypes.toInt() ); // here + if ( null != btAddr ) { + intent.putExtra( REMATCH_BTADDR_EXTRA, btAddr ); + } + if ( null != phone ) { + intent.putExtra( REMATCH_PHONE_EXTRA, phone ); + } + if ( null != relayID ) { + intent.putExtra( REMATCH_RELAYID_EXTRA, relayID ); + } } } return intent;