2006-10-03 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Tue, 3 Oct 2006 14:04:19 +0000 (14:04 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Tue, 3 Oct 2006 14:04:19 +0000 (14:04 -0000)
* ToolTip.cs: Fix rare, but possible, NRE on MouseEnter when
GetContainerControl returns null.

svn path=/trunk/mcs/; revision=66190

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs

index a0257b639fa16168cb3eb50a00679313f7ae598f..79548fd37ea00df3dba77dbcb2848601eca1b999 100644 (file)
@@ -1,3 +1,8 @@
+2006-10-03  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * ToolTip.cs: Fix rare, but possible, NRE on MouseEnter when 
+       GetContainerControl returns null.
+
 2006-10-02  Chris Toshok  <toshok@ximian.com>
 
        * XplatUIX11.cs (GetWindowState): use hwnd.client_window in the
index 6ca9d77ad3134ddd39a87b5f40685c1cd63a3e38..4d36b5acd5a1c64fac44b51d33d6ffa93a317c29 100644 (file)
@@ -376,7 +376,8 @@ namespace System.Windows.Forms {
                        }
 
                        if (!show_always) {
-                               if (((Control)sender).GetContainerControl().ActiveControl == null) {
+                               IContainerControl cc = last_control.GetContainerControl ();
+                               if ((cc == null) || (cc.ActiveControl == null)) {
                                        return;
                                }
                        }