[gnome-software] Fix a crash when failing to get an installed flatpak ref
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Fix a crash when failing to get an installed flatpak ref
- Date: Wed, 28 Sep 2016 12:53:37 +0000 (UTC)
commit afa79a3fa0f8e06aec80c2ef05d3e9d4d0397256
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 997b2b5..483ea31 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -1642,8 +1642,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]