From eacd49ac3487b022857035868f0946d0eccaebaa Mon Sep 17 00:00:00 2001 From: Marc-Andre Laperle Date: Sun, 9 Jun 2013 13:40:25 -0400 Subject: [PATCH] Bug 410007 - SWTException: Widget is disposed while debugging Change-Id: Ia0bf7a6adbc86ec9a7891ef590e3d19e42067f4f Signed-off-by: Marc-Andre Laperle Reviewed-on: https://git.eclipse.org/r/13667 Reviewed-by: Sergey Prigogin Reviewed-by: Anton Leherbauer IP-Clean: Anton Leherbauer Tested-by: Anton Leherbauer --- .../ExpressionInformationControlCreator.java | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ExpressionInformationControlCreator.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ExpressionInformationControlCreator.java index ca0ee3decc8..6e1a60b2bfb 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ExpressionInformationControlCreator.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ExpressionInformationControlCreator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 IBM Corporation and others. + * Copyright (c) 2008, 2013 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 @@ -359,15 +359,18 @@ public class ExpressionInformationControlCreator implements IInformationControlC fViewer.getDisplay().timerExec(100, new Runnable() { @Override public void run() { - TreeSelection selection = (TreeSelection) fViewer.getSelection(); - if (selection.isEmpty()) { - selection = new TreeSelection(fViewer.getTopElementPath()); - } - fViewer.setSelection(selection); - if (fDetailPane != null) { - fDetailPane.display(selection); - } - }}); + if (!fViewer.getTree().isDisposed()) { + TreeSelection selection = (TreeSelection) fViewer.getSelection(); + if (selection.isEmpty()) { + selection = new TreeSelection(fViewer.getTopElementPath()); + } + fViewer.setSelection(selection); + if (fDetailPane != null) { + fDetailPane.display(selection); + } + } + } + }); } @Override public void viewerUpdatesBegin() {