From 14cad646e3ef9ff2ab8b08749003f70f6bce5181 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 25 Aug 2020 15:54:33 -0700 Subject: [PATCH] don't crash when setTitle called with id of 0 --- .../main/java/org/eehouse/android/xw4/loc/LocUtils.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/loc/LocUtils.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/loc/LocUtils.java index 24fdac01c..f66c0bbf1 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/loc/LocUtils.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/loc/LocUtils.java @@ -860,8 +860,11 @@ public class LocUtils { @Override public AlertDialog.Builder setTitle( int id ) { - String str = getString( m_context, id ); - return setTitle( str ); + if ( 0 != id ) { + String str = getString( m_context, id ); + setTitle( str ); + } + return this; } public AlertDialog.Builder setMessage( int textId )