bug 427553: Alt+F4 does not close the application always 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=427553

Change-Id: Ic821ae4c450edf9637180d63c8fad817cc6275df
Reviewed-on: https://git.eclipse.org/r/23446
Tested-by: Hudson CI
Reviewed-by: Judith Gull <jgu@bsiag.com>
IP-Clean: Judith Gull <jgu@bsiag.com>
diff --git a/org.eclipse.scout.rt.client/src/org/eclipse/scout/rt/client/ui/desktop/UnsavedFormChangesForm.java b/org.eclipse.scout.rt.client/src/org/eclipse/scout/rt/client/ui/desktop/UnsavedFormChangesForm.java
index 2760264..71f3d19 100644
--- a/org.eclipse.scout.rt.client/src/org/eclipse/scout/rt/client/ui/desktop/UnsavedFormChangesForm.java
+++ b/org.eclipse.scout.rt.client/src/org/eclipse/scout/rt/client/ui/desktop/UnsavedFormChangesForm.java
@@ -136,9 +136,17 @@
   public class NewHandler extends AbstractFormHandler {
 
     @Override
+    protected void execPostLoad() throws ProcessingException {
+      touch();
+    }
+
+    @Override
     protected void execStore() throws ProcessingException {
-      for (IForm f : getOpenFormsField().getValue()) {
-        f.doOk();
+      IForm[] forms = getOpenFormsField().getValue();
+      if (forms != null) {
+        for (IForm f : forms) {
+          f.doOk();
+        }
       }
     }