Permalink
Browse files

* Control.cs (OnInvalidated): fix NRE relating to last change.

2006-10-11  Chris Toshok  <toshok@ximian.com>


svn path=/trunk/mcs/; revision=66570
  • Loading branch information...
1 parent ed30232 commit f3f9064bad3fe6484ce53ae3260afdabdfb005b5 Chris Toshok committed Oct 11, 2006
@@ -1,3 +1,7 @@
+2006-10-11 Chris Toshok <toshok@ximian.com>
+
+ * Control.cs (OnInvalidated): fix NRE relating to last change.
+
2006-10-11 Chris Toshok <toshok@ximian.com>
* XplatUIX11.cs (SetWMStyles): make sure we include the MAXIMIZED
@@ -4470,7 +4470,11 @@ protected virtual bool ProcessKeyEventArgs (ref Message msg)
// considered Visible (the
// invalid_region.IsVisible call) in
// the WM_PAINT handling below.
- invalid_region.Union (Rectangle.Inflate(e.InvalidRect, 1,1));
+ Rectangle r = Rectangle.Inflate(e.InvalidRect, 1,1);
+ if (invalid_region == null)
+ invalid_region = new Region (r);
+ else
+ invalid_region.Union (r);
}
if (Invalidated!=null) Invalidated(this, e);
}

0 comments on commit f3f9064

Please sign in to comment.