Refs #1631 Fix NPE while showNotifications in WebSearchField

This commit is contained in:
Yuriy Artamonov 2012-11-15 10:39:27 +00:00
parent 5dbce82b22
commit 442f0a1b52

View File

@ -97,8 +97,10 @@ public class WebSearchField
setValue(optionsDatasource.getItem(id));
}
if (optionsDatasource.getState() == Datasource.State.VALID && optionsDatasource.size() == 0)
searchNotifications.notFoundSuggestions(newFilter);
if (searchNotifications != null) {
if (optionsDatasource.getState() == Datasource.State.VALID && optionsDatasource.size() == 0)
searchNotifications.notFoundSuggestions(newFilter);
}
} else {
if (optionsDatasource.getState() == Datasource.State.VALID)
optionsDatasource.clear();