diff --git a/modules/web/src/com/haulmont/cuba/web/gui/components/WebFilter.java b/modules/web/src/com/haulmont/cuba/web/gui/components/WebFilter.java index f7ca867f23..fbb63e3527 100644 --- a/modules/web/src/com/haulmont/cuba/web/gui/components/WebFilter.java +++ b/modules/web/src/com/haulmont/cuba/web/gui/components/WebFilter.java @@ -913,7 +913,7 @@ public class WebFilter extends WebAbstractComponent i public void editorCancelled() { filterEntity = filterEntityBeforeCopy; filterEntityBeforeCopy = null; - if (filterEntity.getXml() == null) + if (filterEntity != null && filterEntity.getXml() == null) filterEntity = null; switchToUse();