From 06c4a3811fbed89e4c28656baef0ffb60b8de7f2 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Tue, 30 Aug 2005 20:51:48 +0000 Subject: [PATCH] 2005-08-30 Mike Kestner * gdk/Event.cs : add some null guarding to GetEvent. [Fixes #75642] svn path=/trunk/gtk-sharp/; revision=49152 --- ChangeLog | 5 +++++ gdk/Event.cs | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7c0d9d8b4..7a90b6902 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-08-30 Mike Kestner + + * gdk/Event.cs : add some null guarding to GetEvent. + [Fixes #75642] + 2005-08-30 Mike Kestner * parser/gapi_pp.pl : ignore ifndef *_H_ lines like in 1.0.x. diff --git a/gdk/Event.cs b/gdk/Event.cs index 0f266bdc4..b67c56a75 100644 --- a/gdk/Event.cs +++ b/gdk/Event.cs @@ -79,6 +79,9 @@ namespace Gdk { public static Event GetEvent (IntPtr raw) { + if (raw == IntPtr.Zero) + return null; + switch (gtksharp_gdk_event_get_event_type (raw)) { case EventType.Expose: return new EventExpose (raw);