[gnome-software] trivial: Do not save an empty license



commit cac77a3b9f949db515d67bd928c41153c44372bf
Author: Matthias Klumpp <matthias tenstral net>
Date:   Tue Apr 26 17:02:23 2016 +0100

    trivial: Do not save an empty license
    
    Signed-off-by: Richard Hughes <richard hughsie com>

 src/gs-app.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 96499b8..8f6e4f8 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -1413,6 +1413,8 @@ gs_app_set_license (GsApp *app, GsAppQuality quality, const gchar *license)
        /* only save this if the data is sufficiently high quality */
        if (quality <= app->license_quality)
                return;
+       if (license == NULL)
+               return;
        app->license_quality = quality;
 
        /* assume free software until we find an unmatched SPDX token */


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