[gnome-builder] flatpak: handle fallbacks more gracefully
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] flatpak: handle fallbacks more gracefully
- Date: Wed, 5 May 2021 04:39:12 +0000 (UTC)
commit 170ee0bc3dc64a6fe66f11eb3ab5e0e4dee72c1b
Author: Christian Hergert <chergert redhat com>
Date: Tue May 4 21:35:31 2021 -0700
flatpak: handle fallbacks more gracefully
src/plugins/flatpak/gbp-flatpak-util.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-util.c b/src/plugins/flatpak/gbp-flatpak-util.c
index 7def8ed4e..b35b1db74 100644
--- a/src/plugins/flatpak/gbp-flatpak-util.c
+++ b/src/plugins/flatpak/gbp-flatpak-util.c
@@ -147,6 +147,8 @@ gbp_flatpak_split_id (const gchar *str,
static const char *
_gbp_flatpak_get_default_arch (IdeObject *object)
{
+ const char *ret = NULL;
+
if (object != NULL)
{
g_autoptr(IdeContext) context = ide_object_ref_context (object);
@@ -157,11 +159,14 @@ _gbp_flatpak_get_default_arch (IdeObject *object)
IpcFlatpakService *service = gbp_flatpak_client_get_service (client, NULL, NULL);
if (service != NULL)
- return ipc_flatpak_service_get_default_arch (service);
+ ret = ipc_flatpak_service_get_default_arch (service);
}
}
- return ide_get_system_arch ();
+ if (ret == NULL)
+ ret = ide_get_system_arch ();
+
+ return ret;
}
const char *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]