[gimp] Don't call gimp_display_get_image() on a NULL display
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Don't call gimp_display_get_image() on a NULL display
- Date: Wed, 7 Oct 2009 17:46:29 +0000 (UTC)
commit e57b0eee633e7c8ae6cb677391e05d14dbb1ad58
Author: Michael Natterer <mitch gimp org>
Date: Wed Oct 7 19:46:01 2009 +0200
Don't call gimp_display_get_image() on a NULL display
app/tools/gimprectangletool.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/app/tools/gimprectangletool.c b/app/tools/gimprectangletool.c
index 10b75f5..9f1102f 100644
--- a/app/tools/gimprectangletool.c
+++ b/app/tools/gimprectangletool.c
@@ -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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]