Prevent NPE

This commit is contained in:
str4d
2015-05-27 11:26:38 +00:00
parent 3de3774153
commit 5d07b277e5

View File

@@ -20,6 +20,9 @@ public class SummaryEditTextPreference extends EditTextPreference {
@Override
public CharSequence getSummary() {
return String.format((String) super.getSummary(), getText());
String summary = (String) super.getSummary();
if (summary == null)
summary = "%s";
return String.format(summary, getText());
}
}