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



commit 1f9a1e082b67ac9faed0e73f31cb68c948ebec29
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]