[gnome-builder/gnome-builder-3-40] flatpak: ensure that arch is not (null)
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-40] flatpak: ensure that arch is not (null)
- Date: Fri, 30 Apr 2021 20:55:00 +0000 (UTC)
commit c2da62e967b4851f0c711871f4aa5e282a95266b
Author: Christian Hergert <chergert redhat com>
Date: Fri Apr 30 13:54:34 2021 -0700
flatpak: ensure that arch is not (null)
src/plugins/flatpak/gbp-flatpak-install-dialog.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-install-dialog.c
b/src/plugins/flatpak/gbp-flatpak-install-dialog.c
index 186043e4e..939e37b26 100644
--- a/src/plugins/flatpak/gbp-flatpak-install-dialog.c
+++ b/src/plugins/flatpak/gbp-flatpak-install-dialog.c
@@ -79,7 +79,13 @@ get_runtimes (GbpFlatpakInstallDialog *self)
2, &branch,
-1);
- g_ptr_array_add (ar, g_strdup_printf ("%s/%s/%s", name, arch, branch ?: ""));
+ if (arch == NULL)
+ arch = g_strdup (flatpak_get_default_arch ());
+
+ if (branch == NULL)
+ branch = g_strdup ("");
+
+ g_ptr_array_add (ar, g_strdup_printf ("%s/%s/%s", name, arch, branch));
}
while (gtk_tree_model_iter_next (GTK_TREE_MODEL (self->liststore1), &iter));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]