X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.debug.ui%2Fsrc%2Forg%2Fsimantics%2Fdebug%2Fui%2FGraphDebugger.java;h=4d2a19dfee2aee2a23f995036fd527aeeb39c902;hp=ca2fa2190c97a99ef6c029cb63a6b97c9a194fc2;hb=6a4a43b278d6819c660182eb4954524d1757e077;hpb=4e40f9793cc18f08f1fa6c96d9bb4f42408997b4 diff --git a/bundles/org.simantics.debug.ui/src/org/simantics/debug/ui/GraphDebugger.java b/bundles/org.simantics.debug.ui/src/org/simantics/debug/ui/GraphDebugger.java index ca2fa2190..4d2a19dfe 100644 --- a/bundles/org.simantics.debug.ui/src/org/simantics/debug/ui/GraphDebugger.java +++ b/bundles/org.simantics.debug.ui/src/org/simantics/debug/ui/GraphDebugger.java @@ -963,8 +963,10 @@ public class GraphDebugger extends Composite { Layer0 L0 = Layer0.getInstance(graph); if (graph.isInstanceOf(r, L0.Assertion)) { Resource pred = graph.getSingleObject(r, L0.HasPredicate); - Resource obj = graph.getSingleObject(r, L0.HasObject); - String tmp = htmlEscape( getResourceName(graph, pred) + " -> " + getResourceName(graph, obj) + " (Assertion)" ); + // Don't know how I encountered this but it seems to be possible in some cases.. + // Resource obj = graph.getSingleObject(r, L0.HasObject); + Resource obj = graph.getPossibleObject(r, L0.HasObject); + String tmp = htmlEscape( getResourceName(graph, pred) + " -> " + (obj == null ? "No object ?" : getResourceName(graph, obj)) + " (Assertion)" ); name = tmp.substring(0, Math.min(80, tmp.length())); } else { String resourceName = getResourceName(graph, r);