[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 144/331] Don't make critical warnings when don't have enough information for a changelog



commit 1f20383caffaedef192fe79b4b9f2be793baeaa9
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri Mar 4 15:42:37 2016 +1300

    Don't make critical warnings when don't have enough information for a changelog

 src/plugins/gs-plugin-apt.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/gs-plugin-apt.c b/src/plugins/gs-plugin-apt.c
index 7761d5e..8d66da2 100644
--- a/src/plugins/gs-plugin-apt.c
+++ b/src/plugins/gs-plugin-apt.c
@@ -385,8 +385,10 @@ get_changelog (GsPlugin *plugin, GsApp *app)
        int i;
        GString *details;
 
-       g_return_if_fail (gs_app_get_source_default (app) != NULL);
-       g_return_if_fail (gs_app_get_update_version (app) != NULL);
+       // Need to know the source and version to download changelog
+       if (gs_app_get_source_default (app) == NULL ||
+           gs_app_get_update_version (app) == NULL)
+               return;
 
        source = gs_app_get_source_default (app);
        if (g_str_has_prefix (source, "lib"))


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