[hyena] ListView: Prefer ANE over NRE in OnMotionNotifyEvent()



commit a96446bf7249765420b2a69ded9e5eebc7188269
Author: Andres G. Aragoneses <knocte gmail com>
Date:   Mon Oct 3 17:37:08 2011 +0100

    ListView: Prefer ANE over NRE in OnMotionNotifyEvent()
    
    Prefer ANE over NRE wrt the Gdk.EventMotion event parameter
    to aid tracking the problem that may lie under bgo#660710.

 .../ListView/ListView_Interaction.cs               |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
index 38f2736..dacf9eb 100644
--- a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
+++ b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
@@ -785,6 +785,10 @@ namespace Hyena.Data.Gui
 
         protected override bool OnMotionNotifyEvent (Gdk.EventMotion evnt)
         {
+            if (evnt == null) {
+                throw new ArgumentNullException ("evnt");
+            }
+
             int x = (int)evnt.X - header_interaction_alloc.X;
 
             if (pressed_column_index >= 0 && !pressed_column_is_dragging &&



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]