1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 03:53:21 +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 // ICDIFunctionBreakpoint on function elements from binary objects can be
// set without having a source handle. For this case of line breakpoint // set without having a source handle. For this case of line breakpoint
// don't try to match breakpoints with source locator of contained CDebugTarget. // don't try to match breakpoints with source locator of contained CDebugTarget.
String handle = ""; String handle = null;
try { try {
handle = breakpoint.getSourceHandle(); handle = breakpoint.getSourceHandle();
} catch (CoreException ex) { } catch (CoreException ex) {
// ignore exception. source handle will be empty anyway. // ignore exception. source handle will be empty anyway.
} }
result = handle.length() > 0; result = (handle != null) && (handle.length() > 0);
} }
} }
return result; return result;