Skip to content

Commit

Permalink
Issue #230
Browse files Browse the repository at this point in the history
Make sure that the main window root panel exists before attempting to persist its layout.
  • Loading branch information
andrewauclair committed Jul 3, 2024
1 parent 0864f9a commit b53b486
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demo-single-app/src/basic/MainFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public void setVisible(boolean visible) {

menuBar.add(window);

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

SimplePanel one = new SimplePanel("one", "one");
SimplePanel two = new SimplePanel("two", "two");
Expand Down
2 changes: 1 addition & 1 deletion docking-api/src/ModernDocking/api/AppStateAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void persist() {
@Override
public void actionPerformed(ActionEvent e) {
// we might have gotten to the timer and then paused persistence
if (!paused) {
if (!paused && docking.getRootPanels().containsKey(docking.getMainWindow())) {
ApplicationLayout layout = docking.getDockingState().getApplicationLayout();

try {
Expand Down

0 comments on commit b53b486

Please sign in to comment.