Tools: Add Pickable check to Align Tool

As reported in issue 10604, if the Align Tool is set to align relative
to a reference object and 'use extents of layer contents' is enabled,
clicking on a path causes a CRITICAL.

This is due to gimp_pickable_auto_shrink () being called, when GimpVectors
are not GimpPickables. A datatype check is added before calling the function
to prevent the issue.
This commit is contained in:
Alx Sa 2024-01-07 14:13:49 +00:00
parent 1553f8b88c
commit b9fe1c64f0
1 changed files with 2 additions and 1 deletions

View File

@ -632,7 +632,8 @@ gimp_align_tool_draw (GimpDrawTool *draw_tool)
x += off_x;
y += off_y;
if (gimp_align_options_align_contents (options))
if (gimp_align_options_align_contents (options) &&
GIMP_IS_PICKABLE (reference))
{
gint shrunk_x;
gint shrunk_y;