Issue #3263: fix critical error on bucket fill tool.

Fixes the error:
> Critical error: gimp_line_art_thaw: assertion 'line_art->priv->frozen'

This may happen in cases when we didn't actually freeze the line art at
pointer click, because we were in an invalid case (for instance,
clicking out of selection), hence we must not thaw the line art either
at button release.

(cherry picked from commit 6391b2bcff)
This commit is contained in:
Jehan
2019-08-27 12:41:49 +02:00
parent 7c0ed951c2
commit 7fc9357452
3 changed files with 9 additions and 1 deletions

View File

@ -536,6 +536,12 @@ gimp_line_art_thaw (GimpLineArt *line_art)
}
}
gboolean
gimp_line_art_is_frozen (GimpLineArt *line_art)
{
return line_art->priv->frozen;
}
GeglBuffer *
gimp_line_art_get (GimpLineArt *line_art,
gfloat **distmap)

View File

@ -65,6 +65,7 @@ void gimp_line_art_set_input (GimpLineArt *line_art,
GimpPickable * gimp_line_art_get_input (GimpLineArt *line_art);
void gimp_line_art_freeze (GimpLineArt *line_art);
void gimp_line_art_thaw (GimpLineArt *line_art);
gboolean gimp_line_art_is_frozen (GimpLineArt *line_art);
GeglBuffer * gimp_line_art_get (GimpLineArt *line_art,
gfloat **distmap);

View File

@ -420,7 +420,8 @@ gimp_bucket_fill_tool_halt (GimpBucketFillTool *tool)
g_clear_object (&tool->priv->fill_mask);
gimp_line_art_thaw (tool->priv->line_art);
if (gimp_line_art_is_frozen (tool->priv->line_art))
gimp_line_art_thaw (tool->priv->line_art);
GIMP_TOOL (tool)->display = NULL;
GIMP_TOOL (tool)->drawable = NULL;