NPE when choose "No Filter" option in Filter Select #PL-2743

This commit is contained in:
Konstantin Devyatkin 2013-09-26 15:11:03 +00:00
parent 01db94dafa
commit add80f9fa0

View File

@ -1252,8 +1252,10 @@ public class DesktopFilter extends DesktopAbstractComponent<JPanel> implements F
if (changingFilter)
return;
filterEntity = ((ItemWrapper<FilterEntity>) select.getValue()).getItem();
if (filterEntity.equals(noFilter)) {
ItemWrapper<FilterEntity> selected = (ItemWrapper<FilterEntity>) select.getValue();
filterEntity = selected == null ? null : selected.getItem();
if (noFilter.equals(filterEntity)) {
filterEntity = null;
}
if ((filterEntity != null) && (applyTo != null) && (Table.class.isAssignableFrom(applyTo.getClass()))) {