From 03ed579b37efb2b9206bcd7f7dc9fab9c289da16 Mon Sep 17 00:00:00 2001 From: Pavol Zibrita Date: Mon, 25 Jul 2011 21:28:20 +0200 Subject: [PATCH] Fixed NPE if GeoIntentActivity is closed immediately --- .../net/osmand/plus/activities/search/GeoIntentActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java index 6b7e257f54..a27e21f469 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java @@ -73,7 +73,9 @@ public class GeoIntentActivity extends ListActivity { e.printStackTrace(); showResult(R.string.error_doing_search, null); } finally { - progressDlg.dismiss(); + if (progressDlg != null) { + progressDlg.dismiss(); + } } } }, "SearchingAddress"); @@ -85,7 +87,6 @@ public class GeoIntentActivity extends ListActivity { } }); progressDlg.setCancelable(true); - } // finish(); }