Bug 423951: NPEs when trying to close EGit Commit dialog
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
index b95c301..51abbf7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
@@ -263,7 +263,7 @@
 			 * If H_SCROLL is set, reverting the TVS_NOHSCROLL settings which
 			 * was applied while adding SWT.MeasureItem event Listener.
 			 */
-			if ((style & SWT.H_SCROLL) != 0) {
+			if ((style & SWT.H_SCROLL) != 0 && (state & DISPOSE_SENT) == 0) {
 				int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
 				bits &= ~OS.TVS_NOHSCROLL;
 				OS.SetWindowLong (handle, OS.GWL_STYLE, bits);