Fix search crash

This commit is contained in:
Alexey Kulish 2017-04-18 12:27:54 +03:00
parent 7d1fc07e2e
commit 236c2a458f

View file

@ -1308,8 +1308,8 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
}
private void reloadHistoryInternal() {
if (historySearchFragment != null) {
try {
LOG.info("+++ start loading history");
SearchResultCollection res = searchUICore.shallowSearch(SearchHistoryAPI.class, "", null);
List<QuickSearchListItem> rows = new ArrayList<>();
if (res != null) {
@ -1318,12 +1318,12 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
}
}
historySearchFragment.updateListAdapter(rows, false);
LOG.info("--- history loaded: count=" + rows.size());
} catch (IOException e) {
} catch (Exception e) {
e.printStackTrace();
app.showToastMessage(e.getMessage());
}
}
}
private void restoreSearch() {
if (addressSearch) {