summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2021-07-06 20:01:37 +0200
committerJens Georg <mail@jensge.org>2021-07-06 20:02:36 +0200
commit66905b4fbdfc9c1056eed5d407769e9fd9d80a0b (patch)
treee4436095595dc5135eea8c8ce916b30f60d85039
parentf7875d63ef637f8ac41ed9ae9a7e1baab932d12a (diff)
downloadgupnp-66905b4fbdfc9c1056eed5d407769e9fd9d80a0b.tar.gz
service-proxy: Unqueue finished action directly
If done, remove from queue. Prevents crash on shutdown Fixes #56
-rw-r--r--libgupnp/gupnp-service-proxy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index 9022344..9f4b61e 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -2117,12 +2117,12 @@ gupnp_service_proxy_call_action_finish (GUPnPServiceProxy *proxy,
{
g_return_val_if_fail (g_task_is_valid (G_TASK (result), proxy), NULL);
- GUPnPServiceProxyAction *action =
- g_task_propagate_pointer (G_TASK (result), error);
+ GUPnPServiceProxyAction *action = g_task_get_task_data (G_TASK (result));
+ gupnp_service_proxy_remove_action (action->proxy, action);
g_clear_weak_pointer (&action->proxy);
action->pending = FALSE;
- return action;
+ return g_task_propagate_pointer (G_TASK (result), error);
}
/**