]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.structural2/src/org/simantics/structural2/utils/StructuralUtils.java
Do not compute replaceable type for non ReplaceableDefinedComponentTypes
[simantics/platform.git] / bundles / org.simantics.structural2 / src / org / simantics / structural2 / utils / StructuralUtils.java
index c5b0087e237def41d9a962f5dac5702bbc501cdf..e27d92f29219a7f54963208286b5bd1936c0f485 100644 (file)
@@ -325,7 +325,9 @@ public class StructuralUtils {
     
     public static Resource structuralTypeResource(ReadGraph graph, Variable component, Resource baseType) throws DatabaseException {
         StructuralOverrideData od = StructuralOverrideData.compute(graph, component);
-        return od.type();
+        if (od != null)
+            return od.type();
+        return null;
     }
     
     public static Resource getComponentType(ReadGraph graph, Variable configuration, Resource component) throws DatabaseException {