diff options
author | Alena Laskavaia | 2008-06-11 13:36:40 +0000 |
---|---|---|
committer | Alena Laskavaia | 2008-06-11 13:36:40 +0000 |
commit | 8c309586cde08f1c2cd04cd4f8ba14cd84c9d906 (patch) | |
tree | 563781c3aa3190e1ffaea91047217c3c8bb417a2 /debug | |
parent | bb5d5613ed4378cec35978256a91338fbf0b2ccb (diff) | |
download | org.eclipse.cdt-8c309586cde08f1c2cd04cd4f8ba14cd84c9d906.tar.gz org.eclipse.cdt-8c309586cde08f1c2cd04cd4f8ba14cd84c9d906.tar.xz org.eclipse.cdt-8c309586cde08f1c2cd04cd4f8ba14cd84c9d906.zip |
[236214] - fixed potential NPE
Diffstat (limited to 'debug')
-rw-r--r-- | debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java index 1a684bf724a..42ac41a5ebf 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java @@ -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; |