mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 07:05:24 +02:00
[240414] NPE in SystemHistoryCombo
This commit is contained in:
parent
f14890553f
commit
2f6d8afd12
2 changed files with 7 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2002, 2008 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) - [240414] NPE in SystemHistoryCombo
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.dialogs;
|
||||
|
@ -164,7 +164,8 @@ public class SystemWorkWithHistoryDialog extends SystemPromptDialog implements
|
|||
mdnMI = createMenuItem(SystemResources.ACTION_HISTORY_MOVEDOWN_LABEL, SystemResources.ACTION_HISTORY_MOVEDOWN_TOOLTIP);
|
||||
|
||||
historyList.setMenu(popupMenu);
|
||||
historyList.setItems(historyInput);
|
||||
if (historyInput != null)
|
||||
historyList.setItems(historyInput);
|
||||
|
||||
clearButton.setEnabled((historyInput!=null) && (historyInput.length>0));
|
||||
rmvButton.setEnabled(false);
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* David Dykstal (IBM) - moved SystemPreferencesManager to a new package
|
||||
* David Dykstal (IBM) - [226561] Add API markup for noextend / noimplement where needed
|
||||
* David McKnight (IBM) - [240414] NPE in SystemHistoryCombo
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.ui.widgets;
|
||||
|
@ -109,7 +110,7 @@ public class SystemHistoryCombo extends Composite implements ISystemCombo, Trave
|
|||
this.maxComboEntries = maxComboEntries;
|
||||
createHistoryButton();
|
||||
String[] history = getHistory();
|
||||
if (history.length > 0)
|
||||
if (history != null && history.length > 0)
|
||||
setItems(history);
|
||||
addOurButtonSelectionListener();
|
||||
}
|
||||
|
@ -288,7 +289,7 @@ public class SystemHistoryCombo extends Composite implements ISystemCombo, Trave
|
|||
{
|
||||
this.historyKey = key;
|
||||
String[] history = getHistory();
|
||||
if (history.length > 0)
|
||||
if (history != null && history.length > 0)
|
||||
setItems(history);
|
||||
else
|
||||
historyCombo.removeAll();
|
||||
|
|
Loading…
Add table
Reference in a new issue