CoverityFix-CID:1350468 Dereference null return value 46/20446/2
Nimish Kapoor [Sun, 5 Aug 2018 18:46:41 +0000 (23:46 +0530)]
Change-Id: Iea072eb789e9c726ecc35825b7e5e9b4bfffdd39

scilab/modules/gui/src/java/org/scilab/modules/gui/utils/ClosingOperationsManager.java

index 5da6e33..73e2fb2 100644 (file)
@@ -534,7 +534,11 @@ public class ClosingOperationsManager {
                 for (SwingScilabDockablePanel tab : list) {
                     if (closingOps.get(tab) == null) {
                         tab.setVisible(false);
-                        tab.getActionButton("undock").getAction().actionPerformed(null);
+                        try {
+                            tab.getActionButton("undock").getAction().actionPerformed(null);
+                        } catch (NullPointerException e) {
+                            e.printStackTrace();
+                        }
                         Action action = ((SciClosingAction) tab.getActionButton(DockingConstants.CLOSE_ACTION).getAction()).getAction();
                         if (action == null) {
                             SwingScilabWindow win = getWindow(tab);