Commit 584b3ceb authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

don't take the image from tool->gdisp, this might be a NULL pointer.

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

	* app/tools/gimptexttool.c (gimp_text_tool_create_vectors): don't
	take the image from tool->gdisp, this might be a NULL pointer.

	* app/core/gimpimage-undo-push.c: removed debugging output.
parent 948dc82f
2004-03-20 Sven Neumann <sven@gimp.org>
* app/tools/gimptexttool.c (gimp_text_tool_create_vectors): don't
take the image from tool->gdisp, this might be a NULL pointer.
* app/core/gimpimage-undo-push.c: removed debugging output.
2004-03-20 Sven Neumann <sven@gimp.org>
* app/widgets/gimppropwidgets.c (gimp_prop_size_entry_callback):
......@@ -1770,9 +1770,6 @@ gimp_image_undo_push_text_layer (GimpImage *gimage,
size = sizeof (TextUndo);
g_printerr ("gimp_image_undo_push_text_layer (%s)\n",
pspec ? pspec->name : NULL);
if (pspec)
{
/* this is incorrect, but how can it be done better? */
......
......@@ -545,8 +545,6 @@ gimp_text_tool_apply (GimpTextTool *text_tool)
pspec = list->data;
g_printerr ("gimp_text_tool_apply: changing %s\n", pspec->name);
g_value_init (&value, pspec->value_type);
g_object_get_property (src, pspec->name, &value);
......@@ -574,16 +572,14 @@ gimp_text_tool_apply (GimpTextTool *text_tool)
static void
gimp_text_tool_create_vectors (GimpTextTool *text_tool)
{
GimpTool *tool = GIMP_TOOL (text_tool);
GimpImage *image = tool->gdisp->gimage;
GimpVectors *vectors;
if (! text_tool->text)
if (! text_tool->text || ! text_tool->image)
return;
gimp_tool_control_set_preserve (tool->control, TRUE);
gimp_tool_control_set_preserve (GIMP_TOOL (text_tool)->control, TRUE);
vectors = gimp_text_vectors_new (image, text_tool->text);
vectors = gimp_text_vectors_new (text_tool->image, text_tool->text);
if (text_tool->layer)
{
......@@ -593,11 +589,11 @@ gimp_text_tool_create_vectors (GimpTextTool *text_tool)
gimp_item_translate (GIMP_ITEM (vectors), x, y, FALSE);
}
gimp_image_add_vectors (image, vectors, -1);
gimp_image_add_vectors (text_tool->image, vectors, -1);
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_set_preserve (GIMP_TOOL (text_tool)->control, FALSE);
gimp_image_flush (image);
gimp_image_flush (text_tool->image);
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment