[gtk+] treeview: Add an explicit return for clarity
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] treeview: Add an explicit return for clarity
- Date: Fri, 17 Jul 2015 22:45:29 +0000 (UTC)
commit ee43462d7421fb08fddf2bce0ff5b2c45e3ece96
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 eb77cd1..05ddece 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2687,6 +2687,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]