diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java index 1e0607dd39b..3f0ac45f7a0 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java @@ -346,8 +346,9 @@ public class GDBControl extends AbstractMIControl implements IGDBControl { public void handleCompleted() { if (isSuccess()) { // Cancel the time out runnable (if it hasn't run yet). - forceQuitTask.cancel(false); - rm.done(); + if (forceQuitTask.cancel(false)) { + rm.done(); + } } // else: the forceQuitTask has or will handle it. // It is good to wait for the forceQuitTask to trigger