diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog index c44944912e3..36c104a5ea3 100644 --- a/launch/org.eclipse.cdt.launch/ChangeLog +++ b/launch/org.eclipse.cdt.launch/ChangeLog @@ -1,3 +1,7 @@ +2006-02-03 Mikhail Khodjaiants + NPE in CDebuggerTab when attaching to a target. + * CDebuggerTab.java + 2006-02-03 Mikhail Khodjaiants The "ICDebuggerPage" interface and "AbstractCDebuggerPage" class are added. All extensions of the "CDebuggerPage" extension point must implement "ICDebuggerPage". diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java index 5b72ac9b2ca..dffb6691caf 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java @@ -244,10 +244,13 @@ public class CDebuggerTab extends AbstractCDebuggerTab { setErrorMessage(MessageFormat.format(LaunchMessages.getString("CDebuggerTab.Mode_not_supported"), new String[]{mode})); //$NON-NLS-1$ return false; } - String mainSymbol = fStopInMainSymbol.getText().trim(); - if (fStopInMain.getSelection() && mainSymbol.length() == 0) { - setErrorMessage( LaunchMessages.getString("CDebuggerTab.Stop_on_startup_at_can_not_be_empty")); //$NON-NLS-1$ - return false; + if ( fStopInMain != null && fStopInMainSymbol != null ) { + // The "Stop on startup at" field must not be empty + String mainSymbol = fStopInMainSymbol.getText().trim(); + if (fStopInMain.getSelection() && mainSymbol.length() == 0) { + setErrorMessage( LaunchMessages.getString("CDebuggerTab.Stop_on_startup_at_can_not_be_empty")); //$NON-NLS-1$ + return false; + } } if (super.isValid(config) == false) { return false;