Add check

This commit is contained in:
Alexander Sytnyk 2017-07-12 16:56:20 +03:00
parent f89b12bd87
commit 719760eed3

View file

@ -2114,8 +2114,10 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
HistoryEntry historyEntry = (HistoryEntry) searchListItem.getSearchResult().object; HistoryEntry historyEntry = (HistoryEntry) searchListItem.getSearchResult().object;
searchHistoryHelper.remove(historyEntry); searchHistoryHelper.remove(historyEntry);
} }
((QuickSearchDialogFragment) getParentFragment()).reloadHistory(); if (getParentFragment() instanceof QuickSearchDialogFragment) {
((QuickSearchDialogFragment) getParentFragment()).enableSelectionMode(false, -1); ((QuickSearchDialogFragment) getParentFragment()).reloadHistory();
((QuickSearchDialogFragment) getParentFragment()).enableSelectionMode(false, -1);
}
} }
}) })
.setNegativeButton(R.string.shared_string_no, null); .setNegativeButton(R.string.shared_string_no, null);