1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 474054 - Null Pointer Exception in "Properties for C/C++ Watchpoint"

when deselecting the "Range" check box

Change-Id: I3ba0cac2bd3e8f9e52378d9d5cc0c25981369a6a
This commit is contained in:
Alvaro Sanchez-Leon 2015-07-31 14:24:23 -04:00 committed by Gerrit Code Review @ Eclipse.org
parent 64243f4a4c
commit 93b7f29f9d

View file

@ -840,7 +840,9 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
ICBreakpoint currentBp = getBreakpoint();
if (!(currentBp instanceof ICFunctionBreakpoint) &&
!(currentBp instanceof ICAddressBreakpoint)) {
!(currentBp instanceof ICAddressBreakpoint) &&
!(currentBp instanceof ICWatchpoint) &&
!(currentBp instanceof ICEventBreakpoint)) {
// Check for duplication of line breakpoints
if (event.getProperty().equals(FieldEditor.VALUE)) {
if (super.isValid()) {
@ -877,7 +879,12 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
source = getPreferenceStore().getString(ICBreakpoint.SOURCE_HANDLE);
}
int line = fLineEditor.getIntValue();
// We only check duplicates for Breakpoints with lines numbers
if (fLineEditor == null) {
return false;
}
int line = fLineEditor.getIntValue();
// Look for any breakpoint that has the same source file and line number as what
// is currently being inputed. Careful not to compare with the current breakpoint