From 6b1d77b11cd97a7e179f2fb63fc6084a068daa2c Mon Sep 17 00:00:00 2001 From: Ell Date: Thu, 19 Jul 2018 02:19:40 -0400 Subject: [PATCH] Issue #1874 - Critical error after selecting "Edit Text on Canvas" ... ... from layer context menu In gimp_text_tool_set_layer(), do nothing if the input layer is the currently-edited layer, otherwise we get a CRITICAL. --- app/tools/gimptexttool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c index d474a69f3b..6f4e6742dc 100644 --- a/app/tools/gimptexttool.c +++ b/app/tools/gimptexttool.c @@ -2054,6 +2054,9 @@ gimp_text_tool_set_layer (GimpTextTool *text_tool, g_return_val_if_fail (GIMP_IS_TEXT_TOOL (text_tool), FALSE); g_return_val_if_fail (layer == NULL || GIMP_IS_LAYER (layer), FALSE); + if (layer == GIMP_LAYER (text_tool->layer)) + return TRUE; + /* FIXME this function works, and I have no clue why: first we set * the drawable, then we HALT the tool and start() it without * re-setting the drawable. Why this works perfectly anyway when