mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-23 08:13:50 +02:00
[302485] RemoteProcessesDialog doesn't check for null selection on okay
This commit is contained in:
parent
4676155046
commit
0bb3b9e3f2
1 changed files with 7 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
* Copyright (c) 2006, 2010 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* David McKnight (IBM) - [302485] RemoteProcessesDialog doesn't check for null selection on okay
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.processes.ui.dialogs;
|
package org.eclipse.rse.internal.processes.ui.dialogs;
|
||||||
|
@ -123,11 +123,12 @@ public class RemoteProcessesDialog extends SystemPromptDialog implements KeyList
|
||||||
protected boolean processOK()
|
protected boolean processOK()
|
||||||
{
|
{
|
||||||
StructuredSelection sel = (StructuredSelection)_viewer.getSelection();
|
StructuredSelection sel = (StructuredSelection)_viewer.getSelection();
|
||||||
|
if (sel.getFirstElement() instanceof IRemoteProcess){
|
||||||
IRemoteProcess proc = (IRemoteProcess)sel.getFirstElement();
|
IRemoteProcess proc = (IRemoteProcess)sel.getFirstElement();
|
||||||
if (proc != null)
|
if (proc != null){
|
||||||
{
|
|
||||||
_selected = proc;
|
_selected = proc;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue