[smuxi: 1/8] Frontend-GNOME: guard ChatTreeView's cell renderer with null checks



commit a179b4026b6a02ae63614ee6e5c0253ecf3d5ad5
Author: Mirco Bauer <meebey meebey net>
Date:   Thu Oct 9 11:14:12 2014 +0200

    Frontend-GNOME: guard ChatTreeView's cell renderer with null checks

 src/Frontend-GNOME/Views/ChatTreeView.cs |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/Frontend-GNOME/Views/ChatTreeView.cs b/src/Frontend-GNOME/Views/ChatTreeView.cs
index 19f2f6a..e93f42b 100644
--- a/src/Frontend-GNOME/Views/ChatTreeView.cs
+++ b/src/Frontend-GNOME/Views/ChatTreeView.cs
@@ -220,6 +220,13 @@ namespace Smuxi.Frontend.Gnome
                                                   Gtk.CellRenderer cellr,
                                                   Gtk.TreeModel model, Gtk.TreeIter iter)
         {
+            if (cellr == null) {
+                throw new ArgumentNullException("cellr");
+            }
+            if (model == null) {
+                throw new ArgumentNullException("model");
+            }
+
             var chat = (ChatView) model.GetValue(iter, 0);
             var renderer = (Gtk.CellRendererPixbuf) cellr;
 
@@ -240,6 +247,13 @@ namespace Smuxi.Frontend.Gnome
                                                   Gtk.CellRenderer cellr,
                                                   Gtk.TreeModel model, Gtk.TreeIter iter)
         {
+            if (cellr == null) {
+                throw new ArgumentNullException("cellr");
+            }
+            if (model == null) {
+                throw new ArgumentNullException("model");
+            }
+
             var chat = (ChatView) model.GetValue(iter, 0);
             var renderer = (Gtk.CellRendererText) cellr;
 
@@ -274,6 +288,13 @@ namespace Smuxi.Frontend.Gnome
                                                       Gtk.CellRenderer cellr,
                                                       Gtk.TreeModel model, Gtk.TreeIter iter)
         {
+            if (cellr == null) {
+                throw new ArgumentNullException("cellr");
+            }
+            if (model == null) {
+                throw new ArgumentNullException("model");
+            }
+
             var chat = (ChatView) model.GetValue(iter, 0);
             var renderer = (Gtk.CellRendererText) cellr;
 


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