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:
parent
bb5d5613ed
commit
8c309586cd
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue