From 0bb3b9e3f2d0d85d04d02be54f80b0378d1089d1 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Wed, 10 Feb 2010 19:50:28 +0000 Subject: [PATCH] [302485] RemoteProcessesDialog doesn't check for null selection on okay --- .../processes/ui/dialogs/RemoteProcessesDialog.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/RemoteProcessesDialog.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/RemoteProcessesDialog.java index 93df1b25af8..23b92ceafac 100644 --- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/RemoteProcessesDialog.java +++ b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/dialogs/RemoteProcessesDialog.java @@ -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 * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,7 +12,7 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * 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; @@ -123,10 +123,11 @@ public class RemoteProcessesDialog extends SystemPromptDialog implements KeyList protected boolean processOK() { StructuredSelection sel = (StructuredSelection)_viewer.getSelection(); - IRemoteProcess proc = (IRemoteProcess)sel.getFirstElement(); - if (proc != null) - { - _selected = proc; + if (sel.getFirstElement() instanceof IRemoteProcess){ + IRemoteProcess proc = (IRemoteProcess)sel.getFirstElement(); + if (proc != null){ + _selected = proc; + } } return true; }