1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-13 12:05:21 +02:00

Bug 294719 - [terminal] SWT Widget disposed exception can happen in TerminalActionPaste::updateAction

This commit is contained in:
Martin Oberhuber 2009-11-10 11:19:33 +00:00
parent 15bf487477
commit 516c3525c1

View file

@ -15,6 +15,7 @@
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
* Anna Dushistova (MontaVista) - [227537] moved actions from terminal.view to terminal plugin * Anna Dushistova (MontaVista) - [227537] moved actions from terminal.view to terminal plugin
* Uwe Stieber (Wind River) - [260372] [terminal] Certain terminal actions are enabled if no target terminal control is available * Uwe Stieber (Wind River) - [260372] [terminal] Certain terminal actions are enabled if no target terminal control is available
* Uwe Stieber (Wind River) - [294719] [terminal] SWT Widget disposed in TerminalActionPaste
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.internal.terminal.control.actions; package org.eclipse.tm.internal.terminal.control.actions;
@ -52,7 +53,7 @@ public class TerminalActionPaste extends AbstractTerminalAction {
public void updateAction(boolean aboutToShow) { public void updateAction(boolean aboutToShow) {
ITerminalViewControl target = getTarget(); ITerminalViewControl target = getTarget();
boolean bEnabled = target != null; boolean bEnabled = aboutToShow && target != null && target.getClipboard() != null && !target.getClipboard().isDisposed();
if (bEnabled) { if (bEnabled) {
String strText = (String) target.getClipboard().getContents( String strText = (String) target.getClipboard().getContents(
TextTransfer.getInstance()); TextTransfer.getInstance());