[gimp] Bug 766342: EEEEeEeek! 4 GeglBuffers leaked
- From: Massimo Valentini <mvalentini src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gimp] Bug 766342: EEEEeEeek! 4 GeglBuffers leaked
- Date: Fri, 13 May 2016 11:13:56 +0000 (UTC)
commit 81e7cb6ba5276b0789165c71d7c1db4162f16e52
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Fri May 13 13:13:22 2016 +0200
    Bug 766342: EEEEeEeek! 4 GeglBuffers leaked
 app/tools/tool_manager.c |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/app/tools/tool_manager.c b/app/tools/tool_manager.c
index 174d369..d11010d 100644
--- a/app/tools/tool_manager.c
+++ b/app/tools/tool_manager.c
@@ -617,18 +617,20 @@ tool_manager_select_tool (Gimp     *gimp,
   /*  reset the previously selected tool, but only if it is not only
    *  temporarily pushed to the tool stack
    */
-  if (tool_manager->active_tool &&
-      ! (tool_manager->tool_stack &&
-         tool_manager->active_tool == tool_manager->tool_stack->data))
+  if (tool_manager->active_tool)
     {
-      GimpTool    *active_tool = tool_manager->active_tool;
-      GimpDisplay *display;
+      if (! tool_manager->tool_stack ||
+          tool_manager->active_tool != tool_manager->tool_stack->data)
+        {
+          GimpTool    *active_tool = tool_manager->active_tool;
+          GimpDisplay *display;
 
-      /*  NULL image returns any display (if there is any)  */
-      display = gimp_tool_has_image (active_tool, NULL);
+          /*  NULL image returns any display (if there is any)  */
+          display = gimp_tool_has_image (active_tool, NULL);
 
-      tool_manager_control_active (gimp, GIMP_TOOL_ACTION_HALT, display);
-      tool_manager_focus_display_active (gimp, NULL);
+          tool_manager_control_active (gimp, GIMP_TOOL_ACTION_HALT, display);
+          tool_manager_focus_display_active (gimp, NULL);
+        }
 
       g_object_unref (tool_manager->active_tool);
     }
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]