[gnome-software/wip/kalev/gnome-3-22: 43/96] trivial: Fix crash when a flatpak runtime is not set



commit 1b1da7bf955cce5f6f6dee4c968c2f85bec09d25
Author: Richard Hughes <richard hughsie com>
Date:   Mon Jan 16 14:15:02 2017 +0000

    trivial: Fix crash when a flatpak runtime is not set

 src/plugins/gs-flatpak.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index b9c8cab..119c9d7 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -2008,8 +2008,11 @@ install_runtime_for_app (GsFlatpak *self,
                         GCancellable *cancellable,
                         GError **error)
 {
-       GsApp *runtime;
-       runtime = gs_app_get_update_runtime (app);
+       GsApp *runtime = gs_app_get_update_runtime (app);
+
+       /* no runtime required */
+       if (runtime == NULL)
+               return TRUE;
 
        /* the runtime could come from a different remote to the app */
        if (!gs_refine_item_metadata (self, runtime, cancellable, error)) {


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