[blam] Channel: Protect another item from being null



commit beacc9f569b5b172942ee884abfa47c44f2db018
Author: Carlos Martín Nieto <carlos cmartin tk>
Date:   Sun Oct 10 18:53:43 2010 +0100

    Channel: Protect another item from being null

 src/Channel.cs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Channel.cs b/src/Channel.cs
index b20d433..c277f86 100644
--- a/src/Channel.cs
+++ b/src/Channel.cs
@@ -90,7 +90,7 @@ namespace Imendio.Blam {
                 Item item;
                 foreach(string id in item_list){
                     item = store.Items[id] as Item;
-                    if(item.Unread && !item.Old){
+                    if(item != null && item.Unread && !item.Old){
                         ++new_items;
                     }
                 }



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