Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2015-12-10 21:39:02 -0500
committerTom Schindl2015-12-10 21:39:02 -0500
commit9ee84b5f3825738a6e38bc752d15737b1b07e856 (patch)
treeb8740aaf05536f6ddfe6b3b1c54ff5d4a4298bc8
parent096cb5bc921d12accc1de0bfa36190070559adc5 (diff)
downloadorg.eclipse.efxclipse-9ee84b5f3825738a6e38bc752d15737b1b07e856.tar.gz
org.eclipse.efxclipse-9ee84b5f3825738a6e38bc752d15737b1b07e856.tar.xz
org.eclipse.efxclipse-9ee84b5f3825738a6e38bc752d15737b1b07e856.zip
fix possible npe
-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