diff --git a/src/org/ntlab/traceDebugger/CallTreeModels.java b/src/org/ntlab/traceDebugger/CallTreeModels.java index b4b2271..c61903d 100644 --- a/src/org/ntlab/traceDebugger/CallTreeModels.java +++ b/src/org/ntlab/traceDebugger/CallTreeModels.java @@ -31,19 +31,21 @@ public void update(DeltaMarkerManager deltaMarkerManager) { reset(); IMarker coordinatorMarker = deltaMarkerManager.getCoordinatorDeltaMarker(); - MethodExecution coordinatorME = DeltaMarkerManager.getMethodExecution(coordinatorMarker); - List markersOrderByAdding = deltaMarkerManager.getMarkersByOrder(); - for (IMarker marker : markersOrderByAdding) { - MethodExecution me = DeltaMarkerManager.getMethodExecution(marker); - CallTreeModel callTreeModel = new CallTreeModel(me); - if (!(callTreeModelsMemo.containsKey(me))) { - callTreeModelsMemo.put(me, callTreeModel); - if (!(me.equals(coordinatorME))) { - linkTreeToCoordinator(callTreeModel, coordinatorME); - } - } + if (coordinatorMarker != null) { + MethodExecution coordinatorME = DeltaMarkerManager.getMethodExecution(coordinatorMarker); + List markersOrderByAdding = deltaMarkerManager.getMarkersByOrder(); + for (IMarker marker : markersOrderByAdding) { + MethodExecution me = DeltaMarkerManager.getMethodExecution(marker); + CallTreeModel callTreeModel = new CallTreeModel(me); + if (!(callTreeModelsMemo.containsKey(me))) { + callTreeModelsMemo.put(me, callTreeModel); + if (!(me.equals(coordinatorME))) { + linkTreeToCoordinator(callTreeModel, coordinatorME); + } + } + } + createCallTreeModels(callTreeModelsMemo.get(coordinatorME)); } - createCallTreeModels(callTreeModelsMemo.get(coordinatorME)); } private void linkTreeToCoordinator(CallTreeModel currentModel, final MethodExecution coordinatorME) {