[gtk+] Avoid a warning if GtkCellView has no model
- From: Matthias Clasen <matthiasc src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtk+] Avoid a warning if GtkCellView has no model
 
- Date: Fri, 21 Jan 2011 03:35:26 +0000 (UTC)
 
commit cfe909848d399de90be3fce57c30e1f25610a9c6
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jan 20 22:35:09 2011 -0500
    Avoid a warning if GtkCellView has no model
 gtk/gtkcellview.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c
index e47f861..bec061d 100644
--- a/gtk/gtkcellview.c
+++ b/gtk/gtkcellview.c
@@ -577,6 +577,9 @@ gtk_cell_view_request_model (GtkCellView        *cellview,
   GtkTreeIter         iter;
   gboolean            valid;
 
+  if (!priv->model)
+    return;
+
   valid = gtk_tree_model_iter_children (priv->model, &iter, parent);
   while (valid)
     {
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]