Skip to content

Commit

Permalink
Don't crash if servald returns a null name
Browse files Browse the repository at this point in the history
  • Loading branch information
lakeman committed Feb 15, 2013
1 parent d258be1 commit c0cf18e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/org/servalproject/rhizome/FilteredCursor.java
Expand Up @@ -21,6 +21,8 @@ public FilteredCursor(Cursor existing) {

while (existing.moveToNext()) {
String name = existing.getString(name_col);
if (name == null || "".equals(name))
name = "[blank]";
long fileSize = existing.getLong(size_col);

if (fileSize == 0 || name.startsWith(".")
Expand Down
4 changes: 2 additions & 2 deletions src/org/servalproject/wizard/SetPhoneNumber.java
Expand Up @@ -139,8 +139,8 @@ protected Boolean doInBackground(Void... params) {
} catch (IllegalArgumentException e) {
app.displayToastMessage(e.getMessage());
} catch (Exception e) {
Log.e("BatPhone", e.toString(), e);
app.displayToastMessage(e.toString());
Log.e("BatPhone", e.getMessage(), e);
app.displayToastMessage(e.getMessage());
}
return false;
}
Expand Down

0 comments on commit c0cf18e

Please sign in to comment.