app: fix gimp_parallel_run_async() cancelation

In gimp_parallel_run_async(), when aborting a GimpAsync operation
in reponse to its "cancel" signal, properly clean up internal data
attached to the object, to avoid use-after-free if the signal is
emitted again.
This commit is contained in:
Ell 2018-05-27 13:53:02 -04:00
parent ad8add6808
commit 3fa4c01bcf
1 changed files with 3 additions and 0 deletions

View File

@ -489,6 +489,9 @@ gimp_parallel_run_async_cancel (GimpAsync *async)
if (link)
{
g_object_set_data (G_OBJECT (async),
"gimp-parallel-run-async-link", NULL);
g_slice_free (GimpParallelRunAsyncTask, link->data);
g_queue_delete_link (&gimp_parallel_run_async_queue, link);