[gtk+/gtk-3-14] treeview: Add an explicit return for clarity
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] treeview: Add an explicit return for clarity
- Date: Fri, 17 Jul 2015 23:44:14 +0000 (UTC)
commit ec4bb715963aff9f7d64880561bf5484d9e11e5a
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 17 18:41:14 2015 -0400
treeview: Add an explicit return for clarity
I believe that first_column can only ever be NULL here if
last_column is NULL too, in which case we'd exited already.
But coverity doesn't see that, so add an explicit exit.
gtk/gtktreeview.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 54b9887..27abfc0 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2698,6 +2698,9 @@ gtk_tree_view_size_allocate_columns (GtkWidget *widget,
first_column = first_column->next)
;
+ if (first_column == NULL)
+ return;
+
rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
/* find out how many extra space and expandable columns we have */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]