Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 18061)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 18062)
@@ -600,5 +600,7 @@
             sticky.addActionListener(e -> {
                 detach();
-                dialogsPanel.reconstruct(Action.ELEMENT_SHRINKS, null);
+                if (dialogsPanel != null) {
+                    dialogsPanel.reconstruct(Action.ELEMENT_SHRINKS, null);
+                }
             });
             add(sticky);
@@ -610,5 +612,7 @@
             close.addActionListener(e -> {
                 hideDialog();
-                dialogsPanel.reconstruct(Action.ELEMENT_SHRINKS, null);
+                if (dialogsPanel != null) {
+                    dialogsPanel.reconstruct(Action.ELEMENT_SHRINKS, null);
+                }
                 hideNotify();
             });
