[gimp] Bug 687851 - Gimp crashes on Colors > Desaturate
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 687851 - Gimp crashes on Colors > Desaturate
- Date: Wed, 7 Nov 2012 22:23:05 +0000 (UTC)
commit 6a33951aa6f7292b7c652d14052eefd8e61d1365
Author: Michael Natterer <mitch gimp org>
Date: Wed Nov 7 23:21:13 2012 +0100
Bug 687851 - Gimp crashes on Colors > Desaturate
Don't install the frame rate limiting draw timeout when resuming a
draw tool that is not active, so accidential timeout installation from
whatever tool dispose code can't happen.
app/tools/gimpdrawtool.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/app/tools/gimpdrawtool.c b/app/tools/gimpdrawtool.c
index cc6b004..64df401 100644
--- a/app/tools/gimpdrawtool.c
+++ b/app/tools/gimpdrawtool.c
@@ -331,12 +331,18 @@ gimp_draw_tool_resume (GimpDrawTool *draw_tool)
if (draw_tool->paused_count == 0)
{
#ifdef USE_TIMEOUT
- if (! draw_tool->draw_timeout)
- draw_tool->draw_timeout =
- gdk_threads_add_timeout_full (G_PRIORITY_HIGH_IDLE,
- DRAW_TIMEOUT,
- (GSourceFunc) gimp_draw_tool_draw_timeout,
- draw_tool, NULL);
+ /* Don't install the timeout if the draw tool isn't active, so
+ * suspend()/resume() can always be called, and have no side
+ * effect on an inactive tool. See bug #687851.
+ */
+ if (gimp_draw_tool_is_active (draw_tool) && ! draw_tool->draw_timeout)
+ {
+ draw_tool->draw_timeout =
+ gdk_threads_add_timeout_full (G_PRIORITY_HIGH_IDLE,
+ DRAW_TIMEOUT,
+ (GSourceFunc) gimp_draw_tool_draw_timeout,
+ draw_tool, NULL);
+ }
#endif
/* call draw() anyway, it will do nothing if the timeout is
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]