[gnome-software/gnome-3-22] Fix a crash when failing to get an installed flatpak ref



commit 981271136fd0e6e14a0bffd04493be8d27c240de
Author: Richard Hughes <richard hughsie com>
Date:   Wed Sep 28 13:53:26 2016 +0100

    Fix a crash when failing to get an installed flatpak ref

 src/plugins/gs-flatpak.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index 218beba..aa37c8c 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -1292,8 +1292,9 @@ gs_plugin_refine_item_size (GsFlatpak *self,
         * and ignore the download size as this is faster */
        if (gs_app_is_installed (app)) {
                g_autoptr(FlatpakInstalledRef) xref = NULL;
-               xref = gs_flatpak_get_installed_ref (self, app,
-                                                    cancellable, error);
+               xref = gs_flatpak_get_installed_ref (self, app, cancellable, error);
+               if (xref == NULL)
+                       return FALSE;
                installed_size = flatpak_installed_ref_get_installed_size (xref);
                if (installed_size == 0)
                        installed_size = GS_APP_SIZE_UNKNOWABLE;


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