[gimp] Issue #3263: fix critical error on bucket fill tool.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Issue #3263: fix critical error on bucket fill tool.
- Date: Tue, 27 Aug 2019 10:44:37 +0000 (UTC)
commit 6391b2bcff1907acb4cf346d3ac85d42f9be5db8
Author: Jehan <jehan girinstud io>
Date: Tue Aug 27 12:41:49 2019 +0200
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.
app/core/gimplineart.c | 6 ++++++
app/core/gimplineart.h | 1 +
app/tools/gimpbucketfilltool.c | 3 ++-
3 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/app/core/gimplineart.c b/app/core/gimplineart.c
index b82ebaa5f7..efe5efaa60 100644
--- a/app/core/gimplineart.c
+++ b/app/core/gimplineart.c
@@ -538,6 +538,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)
diff --git a/app/core/gimplineart.h b/app/core/gimplineart.h
index 67376734f6..cdec1eebc2 100644
--- a/app/core/gimplineart.h
+++ b/app/core/gimplineart.h
@@ -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);
diff --git a/app/tools/gimpbucketfilltool.c b/app/tools/gimpbucketfilltool.c
index 803ad20f7c..6a57ce1f65 100644
--- a/app/tools/gimpbucketfilltool.c
+++ b/app/tools/gimpbucketfilltool.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]