Przeglądaj źródła

EditPart for Null semanticElement is no Note (YAKHMI-628)

benjamin.schwertfeger@gmail.com 13 lat temu
rodzic
commit
9e85dbfba9

+ 3 - 0
de.itemis.gmf.utils/plugins/de.itemis.gmf.runtime.commons/src/de/itemis/gmf/runtime/commons/util/EditPartUtils.java

@@ -15,6 +15,9 @@ public class EditPartUtils {
 	@SuppressWarnings("unchecked")
 	public static IGraphicalEditPart findEditPartForSemanticElement(
 			EditPart editPart, EObject semanticElement) {
+		if (semanticElement == null) {
+			return null;
+		}
 		if (editPart instanceof IGraphicalEditPart) {
 			EObject resolveSemanticElement = ((IGraphicalEditPart) editPart)
 					.resolveSemanticElement();