[hyena] [Hyena.Gui] Ignore null in SetChooserShortcuts



commit 5367685a22bdfd831eeeba75bb5c32e674638ebe
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Sun Nov 14 02:29:40 2010 -0600

    [Hyena.Gui] Ignore null in SetChooserShortcuts

 Hyena.Gui/Hyena.Gui/GtkUtilities.cs |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Gui/GtkUtilities.cs b/Hyena.Gui/Hyena.Gui/GtkUtilities.cs
index 2e45b22..5aa6fe0 100644
--- a/Hyena.Gui/Hyena.Gui/GtkUtilities.cs
+++ b/Hyena.Gui/Hyena.Gui/GtkUtilities.cs
@@ -80,9 +80,11 @@ namespace Hyena.Gui
         public static void SetChooserShortcuts (Gtk.FileChooserDialog chooser, params string [] shortcuts)
         {
             foreach (string shortcut in shortcuts) {
-                try {
-                    chooser.AddShortcutFolder (shortcut);
-                } catch {}
+                if (shortcut != null) {
+                    try {
+                        chooser.AddShortcutFolder (shortcut);
+                    } catch {}
+                }
             }
         }
 



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