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



commit 25c4c9b2dd8e684d95fd3b70118ff6b6c63b926a
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]