[gimp] Bug 686850 - Help system: GIMP crashes and closes without saving changes
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 686850 - Help system: GIMP crashes and closes without saving changes
- Date: Mon, 5 Nov 2012 00:16:29 +0000 (UTC)
commit eac70cc513ef3a073b6f3d2fe3794d13d97b204c
Author: Michael Natterer <mitch gimp org>
Date: Mon Nov 5 01:12:21 2012 +0100
Bug 686850 - Help system: GIMP crashes and closes without saving changes
When gimp_plug_in_close()ing a plug-in (such as when cancel is
clicked), make sure we don't leak the proc_frames of all temporary
procedures the plug-in is currently running. By properly disposing the
GimpPlugInProcFrame, the progress window and its cancel button in
above bug get destroed on first click, and the user has no chance of
trying to kill an already finalized plug-in again.
app/plug-in/gimpplugin.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/app/plug-in/gimpplugin.c b/app/plug-in/gimpplugin.c
index 12e7f76..66bf879 100644
--- a/app/plug-in/gimpplugin.c
+++ b/app/plug-in/gimpplugin.c
@@ -420,8 +420,6 @@ void
gimp_plug_in_close (GimpPlugIn *plug_in,
gboolean kill_it)
{
- GList *list;
-
g_return_if_fail (GIMP_IS_PLUG_IN (plug_in));
g_return_if_fail (plug_in->open);
@@ -533,9 +531,9 @@ gimp_plug_in_close (GimpPlugIn *plug_in,
gimp_wire_clear_error ();
- for (list = plug_in->temp_proc_frames; list; list = g_list_next (list))
+ while (plug_in->temp_proc_frames)
{
- GimpPlugInProcFrame *proc_frame = list->data;
+ GimpPlugInProcFrame *proc_frame = plug_in->temp_proc_frames->data;
#ifdef GIMP_UNSTABLE
g_printerr ("plug-in '%s' aborted before sending its "
@@ -548,6 +546,12 @@ gimp_plug_in_close (GimpPlugIn *plug_in,
{
g_main_loop_quit (proc_frame->main_loop);
}
+
+ /* pop the frame here, because normally this only happens in
+ * gimp_plug_in_handle_temp_proc_return(), which can't
+ * be called after plug_in_close()
+ */
+ gimp_plug_in_proc_frame_pop (plug_in);
}
if (plug_in->main_proc_frame.main_loop &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]