diff --git a/team/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java b/team/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java index fd1da009312..0f1f3d0eb15 100644 --- a/team/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java +++ b/team/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java @@ -528,9 +528,11 @@ protected void diff() { // A null compare configuration indicates that the viewer was disposed if (compareConfiguration != null) { compareConfiguration.getContainer().run(true, true, monitor -> { - monitor.beginTask(CompareMessages.StructureDiffViewer_2, 100); - diffTask.run(SubMonitor.convert(monitor, 100)); - monitor.done(); + try { + diffTask.run(SubMonitor.convert(monitor, CompareMessages.StructureDiffViewer_2, 100)); + } finally { + monitor.done(); + } }); } } catch (InvocationTargetException e) {