Commit 764cc9c8 authored by CDT 1998  Larry Ewing's avatar CDT 1998 Larry Ewing Committed by Larry Ewing
Browse files

Make sure we check the return value from gimp_image_active_drawable.

Sat Aug 15 22:53:36 CDT 1998  Larry Ewing  <lewing@gimp.org>

	* app/gdisplay.c (gdisplay_update_cursor): Make sure we check the
	return value from gimp_image_active_drawable.
parent fe672043
Sat Aug 15 22:53:36 CDT 1998 Larry Ewing <lewing@gimp.org>
* app/gdisplay.c (gdisplay_update_cursor): Make sure we check the
return value from gimp_image_active_drawable.
Sat Aug 15 19:30:42 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* Makefile.am boundary.h boundaryF.h by_color_select.h
......
......@@ -690,20 +690,26 @@ gdisplay_update_cursor (GDisplay *gdisp, int x, int y)
active_drawable = gimp_image_active_drawable (gdisp->gimage);
if (t_x < 0 || t_y < 0 || t_x > active_drawable->width || t_y > active_drawable->height)
if (active_drawable)
{
gtk_label_set(GTK_LABEL (gdisp->cursor_label), "");
}
else
{
g_snprintf(buffer, CURSOR_STR_LENGTH, " %d, %d ", t_x, t_y);
gtk_label_set(GTK_LABEL (gdisp->cursor_label), buffer);
if (t_x < 0 ||
t_y < 0 ||
t_x > active_drawable->width ||
t_y > active_drawable->height)
{
gtk_label_set(GTK_LABEL (gdisp->cursor_label), "");
}
else
{
g_snprintf(buffer, CURSOR_STR_LENGTH, " %d, %d ", t_x, t_y);
gtk_label_set(GTK_LABEL (gdisp->cursor_label), buffer);
}
}
gdisp->have_cursor = new_cursor;
gdisp->cursor_x = x;
gdisp->cursor_y = y;
if (new_cursor)
gdisplay_flush (gdisp);
}
......
......@@ -690,20 +690,26 @@ gdisplay_update_cursor (GDisplay *gdisp, int x, int y)
active_drawable = gimp_image_active_drawable (gdisp->gimage);
if (t_x < 0 || t_y < 0 || t_x > active_drawable->width || t_y > active_drawable->height)
if (active_drawable)
{
gtk_label_set(GTK_LABEL (gdisp->cursor_label), "");
}
else
{
g_snprintf(buffer, CURSOR_STR_LENGTH, " %d, %d ", t_x, t_y);
gtk_label_set(GTK_LABEL (gdisp->cursor_label), buffer);
if (t_x < 0 ||
t_y < 0 ||
t_x > active_drawable->width ||
t_y > active_drawable->height)
{
gtk_label_set(GTK_LABEL (gdisp->cursor_label), "");
}
else
{
g_snprintf(buffer, CURSOR_STR_LENGTH, " %d, %d ", t_x, t_y);
gtk_label_set(GTK_LABEL (gdisp->cursor_label), buffer);
}
}
gdisp->have_cursor = new_cursor;
gdisp->cursor_x = x;
gdisp->cursor_y = y;
if (new_cursor)
gdisplay_flush (gdisp);
}
......
......@@ -690,20 +690,26 @@ gdisplay_update_cursor (GDisplay *gdisp, int x, int y)
active_drawable = gimp_image_active_drawable (gdisp->gimage);
if (t_x < 0 || t_y < 0 || t_x > active_drawable->width || t_y > active_drawable->height)
if (active_drawable)
{
gtk_label_set(GTK_LABEL (gdisp->cursor_label), "");
}
else
{
g_snprintf(buffer, CURSOR_STR_LENGTH, " %d, %d ", t_x, t_y);
gtk_label_set(GTK_LABEL (gdisp->cursor_label), buffer);
if (t_x < 0 ||
t_y < 0 ||
t_x > active_drawable->width ||
t_y > active_drawable->height)
{
gtk_label_set(GTK_LABEL (gdisp->cursor_label), "");
}
else
{
g_snprintf(buffer, CURSOR_STR_LENGTH, " %d, %d ", t_x, t_y);
gtk_label_set(GTK_LABEL (gdisp->cursor_label), buffer);
}
}
gdisp->have_cursor = new_cursor;
gdisp->cursor_x = x;
gdisp->cursor_y = y;
if (new_cursor)
gdisplay_flush (gdisp);
}
......
Supports Markdown
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