[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 161/331] Revert "trivial: Add g_return_if_fail to gs_app_add|has_quirk. Fix check for gs_app_set_license"



commit c7fb54e74b06ca02370d6264cde372adb4a571ab
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 a1d2e5e..7006396 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -1367,13 +1367,13 @@ gs_app_set_license (GsApp *app, GsAppQuality quality, const gchar *license)
        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->license_quality)
                return;
        app->license_quality = quality;
 
+       g_return_if_fail (GS_IS_APP (app));
+
        /* assume free software until we find an unmatched SPDX token */
        app->license_is_free = TRUE;
 
@@ -2112,8 +2112,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;
 }
 
@@ -2123,8 +2121,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]