Browse Source

Fixes some NullpointerCrashes on Gui, when mouse is not on Canvas

Would occur if keys were pressed, without the mouse hovering over the
Canvas
Andreas T. Meyer-Berg 6 years ago
parent
commit
26775e9462
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/ui/view/GUI.java

+ 2 - 1
src/ui/view/GUI.java

@@ -2885,7 +2885,8 @@ public class GUI implements CategoryListener {
 	 */
 	private void chooseTabTemp() {
 		// is the uppernode on tabbedPaneOriginal or tabbedPaneSplit
-		if (tabbedPaneOriginal.getMousePosition() != null) {
+		/* TODO: Fix or Remove SplitView */
+		if (tabbedPaneOriginal.getMousePosition() != null || initSplit) {
 			tabTemp = tabbedPaneOriginal;
 		} else {
 			tabTemp = tabbedPaneSplit;