From 8bb5dbc3216a017d05dabdd8a5f91b85eda7e3d7 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Fri, 7 May 2004 15:01:56 +0000 Subject: [PATCH] 2004-05-07 Mike Kestner * sample/GnomeHelloWorld.cs : guard against null args.Event in the icon_selected_cb, which occurs on button-presses for some reason. Thanks to wmealing on irc for the bug report. svn path=/trunk/gtk-sharp/; revision=26926 --- ChangeLog | 6 ++++++ sample/GnomeHelloWorld.cs | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index ee4e499a3..053d9b7e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-05-07 Mike Kestner + + * sample/GnomeHelloWorld.cs : guard against null args.Event in the + icon_selected_cb, which occurs on button-presses for some reason. + Thanks to wmealing on irc for the bug report. + 2004-05-07 Mike Kestner * sample/*/Makefile.am : rebuild if the assemblies change diff --git a/sample/GnomeHelloWorld.cs b/sample/GnomeHelloWorld.cs index 96a8187a9..8230932b8 100644 --- a/sample/GnomeHelloWorld.cs +++ b/sample/GnomeHelloWorld.cs @@ -151,6 +151,10 @@ namespace GtkSamples { void icon_selected_cb (object obj, Gnome.IconSelectedArgs args) { int idx = args.Num; + + if (args.Event == null) + return; + EventButton ev = new EventButton (args.Event.Handle); if (ev.Type == EventType.TwoButtonPress && ev.Button == 1) {