[libadwaita/wip/exalm/menu-model] tab-view: Fix set_menu_model() check




commit 40657fbe95ec3ba49a704d682b7e193ab24c93ac
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sat Aug 20 13:55:21 2022 +0400

    tab-view: Fix set_menu_model() check
    
    menu_model can be NULL.

 src/adw-tab-view.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/adw-tab-view.c b/src/adw-tab-view.c
index 62f52537..ba51d8d6 100644
--- a/src/adw-tab-view.c
+++ b/src/adw-tab-view.c
@@ -2584,7 +2584,7 @@ adw_tab_view_set_menu_model (AdwTabView *self,
                              GMenuModel *menu_model)
 {
   g_return_if_fail (ADW_IS_TAB_VIEW (self));
-  g_return_if_fail (G_IS_MENU_MODEL (menu_model));
+  g_return_if_fail (menu_model == NULL || G_IS_MENU_MODEL (menu_model));
 
   if (self->menu_model == menu_model)
     return;


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