[banshee] Avoid NRE stopping jobs on shutdown (BGO #587373)



commit fc8e6692d8c94313bb91e9759ce1950d94bf37ae
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Mon Jun 29 17:48:45 2009 -0500

    Avoid NRE stopping jobs on shutdown (BGO #587373)

 .../Banshee.Gui.Dialogs/ConfirmShutdownDialog.cs   |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/ConfirmShutdownDialog.cs b/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/ConfirmShutdownDialog.cs
index 3aa7f43..dc593bc 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/ConfirmShutdownDialog.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/ConfirmShutdownDialog.cs
@@ -89,6 +89,10 @@ namespace Banshee.Gui.Dialogs
                 Dialog.Respond(Gtk.ResponseType.Ok);
                 return;
             }
+
+            if (ListView == null || ListView.Model == null) {
+                return;
+            }
             
             for(int i = 0, n = ListView.Model.IterNChildren(); i < n; i++) {
                 TreeIter iter;



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