[gtk/wip/otte/for-main: 3/3] listview: Fix return_if_fail()s




commit bffa5dfddde61d416bb2955f46baecc091090a1d
Author: Benjamin Otte <otte redhat com>
Date:   Sat Feb 26 03:04:53 2022 +0100

    listview: Fix return_if_fail()s

 gtk/gtkgridview.c        | 2 +-
 gtk/gtklistitemmanager.c | 2 +-
 gtk/gtklistview.c        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkgridview.c b/gtk/gtkgridview.c
index c6cefbb10e..9b903dc5e0 100644
--- a/gtk/gtkgridview.c
+++ b/gtk/gtkgridview.c
@@ -1291,7 +1291,7 @@ gtk_grid_view_set_factory (GtkGridView        *self,
                            GtkListItemFactory *factory)
 {
   g_return_if_fail (GTK_IS_GRID_VIEW (self));
-  g_return_if_fail (factory == NULL || GTK_LIST_ITEM_FACTORY (factory));
+  g_return_if_fail (factory == NULL || GTK_IS_LIST_ITEM_FACTORY (factory));
 
   if (factory == gtk_list_item_manager_get_factory (self->item_manager))
     return;
diff --git a/gtk/gtklistitemmanager.c b/gtk/gtklistitemmanager.c
index 1a0ff55161..bfc6860293 100644
--- a/gtk/gtklistitemmanager.c
+++ b/gtk/gtklistitemmanager.c
@@ -825,7 +825,7 @@ gtk_list_item_manager_set_factory (GtkListItemManager *self,
   GSList *l;
 
   g_return_if_fail (GTK_IS_LIST_ITEM_MANAGER (self));
-  g_return_if_fail (GTK_IS_LIST_ITEM_FACTORY (factory));
+  g_return_if_fail (factory == NULL || GTK_IS_LIST_ITEM_FACTORY (factory));
 
   if (self->factory == factory)
     return;
diff --git a/gtk/gtklistview.c b/gtk/gtklistview.c
index 1868bdc36e..e968f8437a 100644
--- a/gtk/gtklistview.c
+++ b/gtk/gtklistview.c
@@ -1032,7 +1032,7 @@ gtk_list_view_set_factory (GtkListView        *self,
                            GtkListItemFactory *factory)
 {
   g_return_if_fail (GTK_IS_LIST_VIEW (self));
-  g_return_if_fail (factory == NULL || GTK_LIST_ITEM_FACTORY (factory));
+  g_return_if_fail (factory == NULL || GTK_IS_LIST_ITEM_FACTORY (factory));
 
   if (factory == gtk_list_item_manager_get_factory (self->item_manager))
     return;


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