mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +01:00
fix NPE -- by inspection after a logged crash: can't reproduce
This commit is contained in:
parent
49caf6505a
commit
285dedb75f
1 changed files with 10 additions and 7 deletions
|
@ -1078,8 +1078,8 @@ public class GameUtils {
|
||||||
{
|
{
|
||||||
if ( null != bmr ) {
|
if ( null != bmr ) {
|
||||||
Intent intent = GamesListDelegate.makeRowidIntent( context, rowid );
|
Intent intent = GamesListDelegate.makeRowidIntent( context, rowid );
|
||||||
String msg;
|
String msg = null;
|
||||||
int titleID;
|
int titleID = 0;
|
||||||
if ( null != bmr.m_chat ) {
|
if ( null != bmr.m_chat ) {
|
||||||
titleID = R.string.notify_chat_title_fmt;
|
titleID = R.string.notify_chat_title_fmt;
|
||||||
if ( null != bmr.m_chatFrom ) {
|
if ( null != bmr.m_chatFrom ) {
|
||||||
|
@ -1089,13 +1089,16 @@ public class GameUtils {
|
||||||
} else {
|
} else {
|
||||||
msg = bmr.m_chat;
|
msg = bmr.m_chat;
|
||||||
}
|
}
|
||||||
} else {
|
} else if ( null != bmr.m_lmi ) {
|
||||||
titleID = R.string.notify_title_fmt;
|
titleID = R.string.notify_title_fmt;
|
||||||
msg = bmr.m_lmi.format( context );
|
msg = bmr.m_lmi.format( context ); // NPE
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( 0 != titleID ) {
|
||||||
|
String title = LocUtils.getString( context, titleID,
|
||||||
|
getName( context, rowid ) );
|
||||||
|
Utils.postNotification( context, intent, title, msg, (int)rowid );
|
||||||
}
|
}
|
||||||
String title = LocUtils.getString( context, titleID,
|
|
||||||
getName( context, rowid ) );
|
|
||||||
Utils.postNotification( context, intent, title, msg, (int)rowid );
|
|
||||||
} else {
|
} else {
|
||||||
DbgUtils.logdf( "postMoveNotification(): posting nothing for lack"
|
DbgUtils.logdf( "postMoveNotification(): posting nothing for lack"
|
||||||
+ " of brm" );
|
+ " of brm" );
|
||||||
|
|
Loading…
Reference in a new issue