X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTSplitPane.java;fp=src%2Fjexer%2FTSplitPane.java;h=b63ea1fbd06fd8805b3c7e3e27d654f59a3dfaf3;hb=a524aa2e24b0ddeb5aa8105f1bed1c1c7b75e1c7;hp=277f080e22af099cf0bb576eb09dd4637027e4c2;hpb=6738825512004e0992555778e7124b568dd5044c;p=fanfix.git diff --git a/src/jexer/TSplitPane.java b/src/jexer/TSplitPane.java index 277f080..b63ea1f 100644 --- a/src/jexer/TSplitPane.java +++ b/src/jexer/TSplitPane.java @@ -275,7 +275,9 @@ public class TSplitPane extends TWidget { "horizontal split pane"); } if (left == null) { - remove(this.left); + if (this.left != null) { + remove(this.left); + } this.left = null; return; } @@ -305,7 +307,9 @@ public class TSplitPane extends TWidget { "horizontal split pane"); } if (right == null) { - remove(this.right); + if (this.right != null) { + remove(this.right); + } this.right = null; return; } @@ -335,7 +339,9 @@ public class TSplitPane extends TWidget { "split pane"); } if (top == null) { - remove(this.top); + if (this.top != null) { + remove(this.top); + } this.top = null; return; } @@ -365,7 +371,9 @@ public class TSplitPane extends TWidget { "vertical split pane"); } if (bottom == null) { - remove(this.bottom); + if (this.bottom != null) { + remove(this.bottom); + } this.bottom = null; return; } @@ -455,7 +463,7 @@ public class TSplitPane extends TWidget { // Remove me from my parent widget. TWidget newParent = getParent(); - setParent(null, false); + remove(false); if (keep == null) { // Nothing is left of either pane. Remove me and bail out.