瀏覽代碼

Added Nullcheck

Andreas Mülder 11 年之前
父節點
當前提交
a74c8c2ef0

+ 2 - 0
plugins/org.yakindu.sct.simulation.ui/src/org/yakindu/sct/simulation/ui/model/presenter/SCTSourceDisplay.java

@@ -62,6 +62,8 @@ public class SCTSourceDisplay implements ISourceDisplay {
 		if (notationHandler == null) {
 			notationHandler = new DefaultDynamicNotationHandler();
 			IHighlightingSupport support = (IHighlightingSupport) editor.getAdapter(IHighlightingSupport.class);
+			if (support == null)
+				return;
 			notationHandler.setHighlightingSupport(support);
 			handler.put(editor, notationHandler);
 		}