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:
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
|
// 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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue