Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/addons/MinMaxAddon.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/addons/MinMaxAddon.java b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/addons/MinMaxAddon.java
index 9c6fe0f33..60ead3430 100755
--- a/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/addons/MinMaxAddon.java
+++ b/bundles/runtime/org.eclipse.fx.ui.workbench.renderers.base/src/org/eclipse/fx/ui/workbench/renderers/base/addons/MinMaxAddon.java
@@ -25,7 +25,6 @@ import org.eclipse.e4.ui.workbench.modeling.EModelService;
import org.eclipse.fx.ui.workbench.renderers.base.services.MaximizationService;
import org.eclipse.fx.ui.workbench.renderers.base.widget.WMinMaxableWidget;
import org.eclipse.fx.ui.workbench.renderers.base.widget.WMinMaxableWidget.WMinMaxState;
-import org.eclipse.fx.ui.workbench.renderers.base.widget.WWidget.WidgetState;
import org.eclipse.jdt.annotation.NonNull;
import org.osgi.service.event.Event;
@@ -90,6 +89,12 @@ public class MinMaxAddon {
context = this.modelService.getContainingContext(changedElement);
}
+ // Looks like the part has already been unrendered
+ // what should we do when that happens?
+ if( context == null ) {
+ return null;
+ }
+
MaximizationService maximizationService = context.get(MaximizationService.class);
if( state == WMinMaxState.TOGGLE ) {
if( maximizationService.isMaximized(changedElement) ) {

Back to the top