[gimp/gimp-2-10] app: make sure the color picker tool is halted when closing display



commit bb4716b8ee4ec6403a4a0e949cbd17838195ef51
Author: Ell <ell_se yahoo com>
Date:   Tue Jun 19 17:30:58 2018 -0400

    app: make sure the color picker tool is halted when closing display
    
    When using the color-picker tool's info window, set the tool's
    display when a color is picked, and the gui is updated, so that we
    properly halt the tool when the display is closed.  Otherwise, we
    may segfault.
    
    (cherry picked from commit 335023b127b1163e49e36193caa76f50e8109070)

 app/tools/gimpcolorpickertool.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/app/tools/gimpcolorpickertool.c b/app/tools/gimpcolorpickertool.c
index 3cabdf646d..2b61f09185 100644
--- a/app/tools/gimpcolorpickertool.c
+++ b/app/tools/gimpcolorpickertool.c
@@ -428,9 +428,12 @@ gimp_color_picker_tool_info_update (GimpColorPickerTool *picker_tool,
                                     gint                 x,
                                     gint                 y)
 {
+  GimpTool     *tool     = GIMP_TOOL (picker_tool);
   GimpImage    *image    = gimp_display_get_image (display);
   GimpDrawable *drawable = gimp_image_get_active_drawable (image);
 
+  tool->display = display;
+
   gimp_tool_gui_set_shell (picker_tool->gui,
                            gimp_display_get_shell (display));
   gimp_tool_gui_set_viewable (picker_tool->gui,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]