[blam] Channel: Protect another item from being null
- From: Carlos Martín Nieto <cmartin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [blam] Channel: Protect another item from being null
- Date: Sun, 10 Oct 2010 17:59:19 +0000 (UTC)
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]