XSharp Crash-On-Exit Problem
Mohan Embar <gnustuff-EP4lKMzg/[email protected]>
| Newsgroups | gmane.comp.gnu.dotgnu.developer |
|---|---|
| Message-ID | <4VQYXPOQO53XS04YUFBV0O42N.4158062e@p733> |
Hi People, I'm taking the latest DotGNU PNET CVS for a spin. My Portable Nim game still crashes on exit. Several months ago, I submitted a fix for this: http://dotgnu.org/pipermail/developers/2004-March/011994.html ...but it apparently was never reviewed or applied. The fix still applies cleanly to CVS HEAD and still fixes the problem in question. I've reattached it here. If you want, I'll submit a formal ChangeLog entry. Thanks again for the nice work. -- Mohan http://www.thisiscool.com/ http://www.animalsong.org/
inval.diff
(application/octet-stream, 1 KB)
Index: Xsharp/Drawable.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Xsharp/Drawable.cs,v
retrieving revision 1.5
diff -u -2 -r1.5 Drawable.cs
--- Xsharp/Drawable.cs 4 Feb 2004 07:27:07 -0000 1.5
+++ Xsharp/Drawable.cs 5 Mar 2004 08:14:21 -0000
@@ -158,4 +158,12 @@
}
}
+
+ internal bool IsValidHandle
+ {
+ get
+ {
+ return handle != XDrawable.Zero;
+ }
+ }
/// <summary>
Index: Xsharp/InputOutputWidget.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Xsharp/InputOutputWidget.cs,v
retrieving revision 1.9
diff -u -2 -r1.9 InputOutputWidget.cs
--- Xsharp/InputOutputWidget.cs 4 Feb 2004 07:27:07 -0000 1.9
+++ Xsharp/InputOutputWidget.cs 5 Mar 2004 08:14:22 -0000
@@ -477,5 +477,5 @@
{
// No point redrawing if we are unmapped.
- if(mapped && AncestorsMapped)
+ if(IsValidHandle && mapped && AncestorsMapped)
{
ClearRegion(region, XBool.True);