aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2014-01-26 10:47:34 +0100
committerSamuel Tardieu <sam@rfc1149.net>2014-01-26 10:48:29 +0100
commit1bff5e962d26ddd0b8d8217e04b96aa55b5826ea (patch)
tree9be48d2efa4984e88a49a76500fde7a2c85d09b5
parent16f5c1e4dead7a8648d1f0d18c9dc385d614f1e2 (diff)
downloadcgeo-1bff5e962d26ddd0b8d8217e04b96aa55b5826ea.zip
cgeo-1bff5e962d26ddd0b8d8217e04b96aa55b5826ea.tar.gz
cgeo-1bff5e962d26ddd0b8d8217e04b96aa55b5826ea.tar.bz2
fix #3570: crash when dismissing a progress dialog
This crash should never happen if we handled lifecycles more correctly. But to avoid penalizing users in the meantime, this temporary fix will allow the application to go on.
-rw-r--r--main/src/cgeo/geocaching/activity/Progress.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/activity/Progress.java b/main/src/cgeo/geocaching/activity/Progress.java
index 34e7623..5fc64f2 100644
--- a/main/src/cgeo/geocaching/activity/Progress.java
+++ b/main/src/cgeo/geocaching/activity/Progress.java
@@ -1,6 +1,7 @@
package cgeo.geocaching.activity;
import cgeo.geocaching.ui.dialog.CustomProgressDialog;
+import cgeo.geocaching.utils.Log;
import android.app.ProgressDialog;
import android.content.Context;
@@ -28,7 +29,11 @@ public class Progress {
public synchronized void dismiss() {
if (dialog != null && dialog.isShowing()) {
- dialog.dismiss();
+ try {
+ dialog.dismiss();
+ } catch (final Exception e) {
+ Log.e("Progress.dismiss", e);
+ }
}
dialog = null;
}