1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-11 10:15:39 +02:00

check if the list is empty before calling -break-delete

This commit is contained in:
Mikhail Khodjaiants 2004-10-15 20:02:28 +00:00
parent aa6f9b5a00
commit 5516776ca9

View file

@ -639,10 +639,12 @@ public class BreakpointManager extends Manager {
pointList.addAll(Arrays.asList(points));
}
} catch (MIException e) {
// Things did not go well remove all the breakpoints we've set before.
MIBreakpoint[] allPoints = (MIBreakpoint[]) pointList.toArray(new MIBreakpoint[pointList.size()]);
try {
deleteMIBreakpoints(target, allPoints);
// Things did not go well remove all the breakpoints we've set before.
MIBreakpoint[] allPoints = (MIBreakpoint[]) pointList.toArray(new MIBreakpoint[pointList.size()]);
if (allPoints != null && allPoints.length > 0) {
deleteMIBreakpoints(target, allPoints);
}
} catch (CDIException cdie) {
// ignore this one;
}