[gnome-software/wip/ubuntu-changes] Revert "trivial: Add g_return_if_fail to gs_app_add|has_quirk. Fix check for gs_app_set_license"



commit e7b3d70b49a1dc28a67aa390dee9dc686ec9f107
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri Mar 18 10:52:38 2016 +1300

    Revert "trivial: Add g_return_if_fail to gs_app_add|has_quirk. Fix check for gs_app_set_license"
    
    This reverts commit 4713b9cb51785f47802962c6f9e5e9638b747323.
    
    There is a better fix for this so this is not essential anymore

 src/gs-app.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index ebe5747..c300875 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -1291,13 +1291,13 @@ gs_app_set_license (GsApp *app, GsAppQuality quality, const gchar *licence)
        guint i;
        g_auto(GStrv) tokens = NULL;
 
-       g_return_if_fail (GS_IS_APP (app));
-
        /* only save this if the data is sufficiently high quality */
        if (quality <= app->licence_quality)
                return;
        app->licence_quality = quality;
 
+       g_return_if_fail (GS_IS_APP (app));
+
        /* assume free software until we find an unmatched SPDX token */
        app->licence_is_free = TRUE;
 
@@ -2019,8 +2019,6 @@ gs_app_set_to_be_installed (GsApp *app, gboolean to_be_installed)
 gboolean
 gs_app_has_quirk (GsApp *app, AsAppQuirk quirk)
 {
-       g_return_val_if_fail (GS_IS_APP (app), FALSE);
-
        return (app->quirk & quirk) > 0;
 }
 
@@ -2030,8 +2028,6 @@ gs_app_has_quirk (GsApp *app, AsAppQuirk quirk)
 void
 gs_app_add_quirk (GsApp *app, AsAppQuirk quirk)
 {
-       g_return_if_fail (GS_IS_APP (app));
-
        app->quirk |= quirk;
 }
 


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