[gimp] app: ref the GimpProgress in gimp_procedure_execute[_async]()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: ref the GimpProgress in gimp_procedure_execute[_async]()
- Date: Sun, 28 May 2017 15:42:09 +0000 (UTC)
commit 03085f491dd9efaf07ec4f47ce89ab0201f1064f
Author: Michael Natterer <mitch gimp org>
Date: Sun May 28 17:37:32 2017 +0200
app: ref the GimpProgress in gimp_procedure_execute[_async]()
around calling the actual execute vfuncs, Seen a crash when quitting
GIMP while a script-fu window was open, the progress was already
finalized. Now it simply prints the error message about the failing
script on the concole.
app/pdb/gimpprocedure.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/app/pdb/gimpprocedure.c b/app/pdb/gimpprocedure.c
index a30d430..f14bdc9 100644
--- a/app/pdb/gimpprocedure.c
+++ b/app/pdb/gimpprocedure.c
@@ -414,6 +414,9 @@ gimp_procedure_execute (GimpProcedure *procedure,
else
context = gimp_pdb_context_new (gimp, context, TRUE);
+ if (progress)
+ g_object_ref (progress);
+
/* call the procedure */
return_vals = GIMP_PROCEDURE_GET_CLASS (procedure)->execute (procedure,
gimp,
@@ -422,6 +425,9 @@ gimp_procedure_execute (GimpProcedure *procedure,
args,
error);
+ if (progress)
+ g_object_unref (progress);
+
g_object_unref (context);
if (return_vals)
@@ -499,10 +505,16 @@ gimp_procedure_execute_async (GimpProcedure *procedure,
else
context = gimp_pdb_context_new (gimp, context, TRUE);
+ if (progress)
+ g_object_ref (progress);
+
GIMP_PROCEDURE_GET_CLASS (procedure)->execute_async (procedure, gimp,
context, progress,
args, display);
+ if (progress)
+ g_object_unref (progress);
+
g_object_unref (context);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]