[gnome-software: 1/2] snap: Add missing async finish call
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 1/2] snap: Add missing async finish call
- Date: Tue, 8 Feb 2022 08:42:24 +0000 (UTC)
commit 9e4f708201a9216e44f9ea40390bb0d38d4fca34
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon Feb 7 13:33:05 2022 +0000
snap: Add missing async finish call
This fixes a crash in the snap plugin introduced by commit
d3736cf2e3c2d38fa4a1de76ce8a8d84369be293 being incomplete and untested.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Fixes: #1629
plugins/snap/gs-plugin-snap.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index 905825f6b..dbd96bce1 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -1218,6 +1218,12 @@ get_snaps_cb (GObject *object,
g_autoptr(GPtrArray) local_snaps = NULL;
g_autoptr(GError) local_error = NULL;
+ local_snaps = snapd_client_get_snaps_finish (client, result, &local_error);
+ if (local_snaps == NULL) {
+ g_task_return_error (task, g_steal_pointer (&local_error));
+ return;
+ }
+
for (guint i = 0; i < gs_app_list_length (list); i++) {
GsApp *app = gs_app_list_index (list, i);
const gchar *snap_name, *name, *website, *contact, *version;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]