only set the text layer's color if a color is being dropped. Fixes crash

2004-03-12  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-dnd.c (gimp_display_shell_bucket_fill):
	only set the text layer's color if a color is being dropped. Fixes
	crash on pattern drops (bug #136645).
This commit is contained in:
Sven Neumann 2004-03-12 00:50:36 +00:00 committed by Sven Neumann
parent 8827ea203a
commit 8a2b0af371
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2004-03-12 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-dnd.c (gimp_display_shell_bucket_fill):
only set the text layer's color if a color is being dropped. Fixes
crash on pattern drops (bug #136645).
2004-03-12 Sven Neumann <sven@gimp.org>
* app/tools/gimptexttool.c (gimp_text_tool_editor): always connect

View File

@ -190,7 +190,8 @@ gimp_display_shell_bucket_fill (GimpDisplayShell *shell,
/* FIXME: there should be a virtual method for this that the
GimpTextLayer can override. */
if (GIMP_IS_TEXT_LAYER (drawable) &&
if (color &&
GIMP_IS_TEXT_LAYER (drawable) &&
(text = gimp_text_layer_get_text (GIMP_TEXT_LAYER (drawable))) != NULL)
{
g_object_set (text, "color", color, NULL);