mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-13 20:15:22 +02:00
Bug 294719 - [terminal] SWT Widget disposed exception can happen in TerminalActionPaste::updateAction
This commit is contained in:
parent
15bf487477
commit
516c3525c1
1 changed files with 2 additions and 1 deletions
|
@ -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());
|
||||||
|
|
Loading…
Add table
Reference in a new issue