1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

[236214] - fixed potential NPE

This commit is contained in:
Alena Laskavaia 2008-06-11 13:36:40 +00:00
parent bb5d5613ed
commit 8c309586cd

View file

@ -1202,13 +1202,14 @@ public class CBreakpointManager implements IBreakpointsListener, IBreakpointMana
// ICDIFunctionBreakpoint on function elements from binary objects can be
// set without having a source handle. For this case of line breakpoint
// don't try to match breakpoints with source locator of contained CDebugTarget.
String handle = "";
String handle = null;
try {
handle = breakpoint.getSourceHandle();
} catch (CoreException ex) {
// ignore exception. source handle will be empty anyway.
}
result = handle.length() > 0;
result = (handle != null) && (handle.length() > 0);
}
}
return result;