From e335f09c296e7153c9aa49a31c889de22744cf72 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Tue, 30 May 2017 12:01:44 +0300 Subject: [PATCH] Fix QuickSearchDialogFragment crash --- .../net/osmand/plus/search/QuickSearchDialogFragment.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java index 83e87a54aa..caa447f935 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java @@ -769,7 +769,10 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC searching = false; hideProgressBar(); updateClearButtonVisibility(true); - getDialog().hide(); + Dialog dialog = getDialog(); + if (dialog != null) { + dialog.hide(); + } app.getLocationProvider().addCompassListener(app.getLocationProvider().getNavigationInfo()); }