mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 01:43:24 +00:00
widgets: Prevent crash when converting to indexed image
Resolves #13092 GIMP crashed when converting an image to indexed mode, if the user first changed the color in the Configure Grid Dialogue. This was because signals were not being properly disconnected from GimpColorMapSelection after the dialogue was closed. Jehan found the solution, to replace g_signal_connect_swapped () calls with g_signal_connect_object () and flags set to G_CONNECT_SWAPPED to retain the original behavior. This ensures the signals are disconnected after the widget is destroyed on dialogue close.
This commit is contained in:
parent
e139e016a5
commit
4d8073a3a0
1 changed files with 6 additions and 6 deletions
|
@ -796,12 +796,12 @@ gimp_colormap_selection_image_changed (GimpColormapSelection *selection,
|
|||
|
||||
if (image)
|
||||
{
|
||||
g_signal_connect_swapped (image, "colormap-changed",
|
||||
G_CALLBACK (gimp_colormap_selection_colormap_changed),
|
||||
selection);
|
||||
g_signal_connect_swapped (image, "mode-changed",
|
||||
G_CALLBACK (gimp_colormap_selection_set_palette),
|
||||
selection);
|
||||
g_signal_connect_object (image, "colormap-changed",
|
||||
G_CALLBACK (gimp_colormap_selection_colormap_changed),
|
||||
selection, G_CONNECT_SWAPPED);
|
||||
g_signal_connect_object (image, "mode-changed",
|
||||
G_CALLBACK (gimp_colormap_selection_set_palette),
|
||||
selection, G_CONNECT_SWAPPED);
|
||||
}
|
||||
|
||||
gimp_colormap_selection_set_palette (selection);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue