[gnome-software/wip/kalev/local-bundles: 1/2] flatpak: trivial: Downgrade an assert to critical



commit 791cd5337c6dda153ad09575f0d70cd3bb095f89
Author: Kalev Lember <klember redhat com>
Date:   Tue Oct 16 10:57:42 2018 +0200

    flatpak: trivial: Downgrade an assert to critical
    
    I don't have confidence any more that the assert will hold.

 plugins/flatpak/gs-flatpak-app.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plugins/flatpak/gs-flatpak-app.c b/plugins/flatpak/gs-flatpak-app.c
index a71b0eed..5f1ffb2c 100644
--- a/plugins/flatpak/gs-flatpak-app.c
+++ b/plugins/flatpak/gs-flatpak-app.c
@@ -110,10 +110,10 @@ gs_flatpak_app_get_ref_display (GsApp *app)
        const gchar *ref_arch = gs_flatpak_app_get_ref_arch (app);
        const gchar *ref_branch = gs_flatpak_app_get_ref_branch (app);
 
-       g_assert (ref_kind_as_str != NULL);
-       g_assert (ref_name != NULL);
-       g_assert (ref_arch != NULL);
-       g_assert (ref_branch != NULL);
+       g_return_val_if_fail (ref_kind_as_str != NULL, NULL);
+       g_return_val_if_fail (ref_name != NULL, NULL);
+       g_return_val_if_fail (ref_arch != NULL, NULL);
+       g_return_val_if_fail (ref_branch != NULL, NULL);
 
        return g_strdup_printf ("%s/%s/%s/%s",
                                ref_kind_as_str,


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