Don't call gimp_display_get_image() on a NULL display

This commit is contained in:
Michael Natterer 2009-10-07 19:46:01 +02:00
parent 6ad76d226e
commit e57b0eee63
1 changed files with 4 additions and 2 deletions

View File

@ -4124,8 +4124,8 @@ gimp_rectangle_tool_get_constraints (GimpRectangleTool *rect_tool,
gint *max_y,
GimpRectangleConstraint constraint)
{
GimpTool *tool = GIMP_TOOL (rect_tool);
GimpImage *image = gimp_display_get_image (tool->display);
GimpTool *tool = GIMP_TOOL (rect_tool);
GimpImage *image;
gint min_x_dummy;
gint min_y_dummy;
gint max_x_dummy;
@ -4144,6 +4144,8 @@ gimp_rectangle_tool_get_constraints (GimpRectangleTool *rect_tool,
if (! tool->display)
return;
image = gimp_display_get_image (tool->display);
switch (constraint)
{
case GIMP_RECTANGLE_CONSTRAIN_IMAGE: