Skip to content

Commit

Permalink
Fix #27, Try #1
Browse files Browse the repository at this point in the history
  • Loading branch information
pietrorampini committed Nov 19, 2013
1 parent 2bd1d8c commit 82b246b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/src/com/rampo/updatechecker/UpdateChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,10 @@ public void showDialog(String versionDownloadable) {
try {
dialog.show(getActivity().getSupportFragmentManager(), null);
} catch (NullPointerException activityClosed) {
/* This happens when the library tries to open a dialog,
but the activity is already closed, so generates a NullPointerException.
In this way, a force close is avoided.*/
}
} catch (IllegalStateException activityClosed) {
} /* Catch blocks happens when the library tries to open a dialog,
but the activity is already closed, so generates a NullPointerException or IllegalStateException.
In this way, a force close is avoided.*/
}

/**
Expand Down

0 comments on commit 82b246b

Please sign in to comment.