additional checks to avoid swt exceptions when early finish wizard and proxy set incorrectly
authordadubrow
Thu, 27 Aug 2009 15:07:46 -0500
changeset 465 53630b3cab85
parent 464 23791b613725
child 466 c4dbcabf03e8
additional checks to avoid swt exceptions when early finish wizard and proxy set incorrectly
connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java	Thu Aug 27 13:58:53 2009 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java	Thu Aug 27 15:07:46 2009 -0500
@@ -487,6 +487,10 @@
 	private synchronized void initializeInstallerData() {
 		Display.getDefault().asyncExec(new Runnable() {
 			public void run() {
+				Control control = installerTreeViewer.getControl();
+				if (control == null || control.isDisposed())
+					return;
+				
 				if (installerTreeViewer.getContentProvider() == null)
 					installerTreeViewer.setContentProvider(new TreeNodeContentProvider());
 				installerTreeViewer.setInput(LOADING_CONTENT_INPUT);
@@ -502,7 +506,13 @@
 		
 		Display.getDefault().asyncExec(new Runnable() {
 			public void run() {
+				Control control = installerTreeViewer.getControl();
+				if (control == null || control.isDisposed())
+					return;
+				
 				// update installer tree
+				if (installerTreeViewer.getContentProvider() == null)
+					installerTreeViewer.setContentProvider(new TreeNodeContentProvider());
 				installerTreeViewer.setInput(treeNodes);
 				installerTreeViewer.refresh(true);
 				installerTreeViewer.expandAll();