[gthumb] use g_return_val_if_fail when returning a value



commit d6e4139dd066cc229be8f3163d332aee8d80ad69
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Thu Aug 14 15:52:31 2014 +0200

    use g_return_val_if_fail when returning a value

 gthumb/gth-browser.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index a0c9297..7542603 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -5003,8 +5003,8 @@ gth_browser_add_header_bar_button (GthBrowser                     *browser,
 {
        GtkWidget *button;
 
-       g_return_if_fail (icon_name != NULL);
-       g_return_if_fail (action_name != NULL);
+       g_return_val_if_fail (icon_name != NULL, NULL);
+       g_return_val_if_fail (action_name != NULL, NULL);
 
        button = _gtk_image_button_new_for_header_bar (icon_name);
        _gth_browser_setup_header_bar_button (browser, section, icon_name, tooltip, action_name, accelerator, 
button);
@@ -5023,8 +5023,8 @@ gth_browser_add_header_bar_toggle_button (GthBrowser                      *browser,
 {
        GtkWidget *button;
 
-       g_return_if_fail (icon_name != NULL);
-       g_return_if_fail (action_name != NULL);
+       g_return_val_if_fail (icon_name != NULL, NULL);
+       g_return_val_if_fail (action_name != NULL, NULL);
 
        button = _gtk_toggle_image_button_new_for_header_bar (icon_name);
        _gth_browser_setup_header_bar_button (browser, section, icon_name, tooltip, action_name, accelerator, 
button);


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