[hyena] a11y: Fix a NullReferenceException in ListViewAccessible (bgo#683498)



commit 73e6e84097f934e1cfe696e8e4037397673bcb58
Author: Andres G. Aragoneses <knocte gmail com>
Date:   Sat Sep 15 19:25:51 2012 +0100

    a11y: Fix a NullReferenceException in ListViewAccessible (bgo#683498)
    
    Even though the user claims to set a11y as disabled, this
    nullreference was still happening somehow.
    
    The null check makes the problem go away. Thanks Andy Goar for testing!

 .../Accessibility/ListViewAccessible.cs            |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Data.Gui/Accessibility/ListViewAccessible.cs b/Hyena.Gui/Hyena.Data.Gui/Accessibility/ListViewAccessible.cs
index 33ca748..77dd119 100644
--- a/Hyena.Gui/Hyena.Data.Gui/Accessibility/ListViewAccessible.cs
+++ b/Hyena.Gui/Hyena.Data.Gui/Accessibility/ListViewAccessible.cs
@@ -48,7 +48,9 @@ namespace Hyena.Data.Gui.Accessibility
             Name = "ListView";
             Description = "ListView";
             Role = Atk.Role.Table;
-            Parent = list_view.Parent.RefAccessible ();
+            if (list_view.Parent != null) {
+                Parent = list_view.Parent.RefAccessible ();
+            }
 
             cell_cache = new Dictionary<int, ColumnCellAccessible> ();
 



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