plugin-manager: allow multiple calls to port_context_complete()

Only the first one will work.
This commit is contained in:
Aleksander Morgado
2017-10-05 23:46:42 +02:00
parent bbe5064591
commit 2dc13fd964
+5 -2
View File
@@ -255,8 +255,11 @@ port_context_complete (PortContext *port_context)
{
GTask *task;
/* Steal the task from the task */
g_assert (port_context->task);
/* If already completed, do nothing */
if (!port_context->task)
return;
/* Steal the task from the context, we only will complete once */
task = port_context->task;
port_context->task = NULL;