sanity check in popup_open()

--Sven
This commit is contained in:
Sven Neumann 1999-08-31 09:19:13 +00:00
parent 99f35577ea
commit f7e80423af
7 changed files with 35 additions and 6 deletions

View File

@ -1,3 +1,8 @@
Tue Aug 31 11:16:52 MEST 1999 Sven Neumann <sven@gimp.org>
* app/gimpbrushpreview.c
* app/gimppatternpreview.c: check if brush/pattern is not NULL
Tue Aug 31 01:13:13 EDT 1999 Adrian Likins <alikins@redhat.com>
* app/pencil.c: add a "Use Pressure" check button to the options

View File

@ -231,6 +231,10 @@ gimp_brush_preview_popup_open (GimpBrushPreview *gbp,
gint width, height;
guchar bg;
g_return_if_fail (gbp != NULL);
if (!gbp->brush)
return;
width = gbp->brush->mask->width;
height = gbp->brush->mask->height;
@ -334,7 +338,7 @@ gimp_brush_preview_draw (GimpBrushPreview *gbp)
guchar bg;
gint x, y;
g_return_if_fail (gbp->brush != NULL);
g_return_if_fail (gbp != NULL && gbp->brush != NULL);
brush_width = gbp->brush->mask->width;
brush_height = gbp->brush->mask->height;

View File

@ -205,6 +205,10 @@ gimp_pattern_preview_popup_open (GimpPatternPreview *gpp,
guchar *mask;
gint width, height;
g_return_if_fail (gpp != NULL);
if (!gpp->pattern)
return;
width = gpp->pattern->mask->width;
height = gpp->pattern->mask->height;
@ -296,7 +300,7 @@ gimp_pattern_preview_draw (GimpPatternPreview *gpp)
guchar *mask, *buf, *b;
gint x, y;
g_return_if_fail (gpp->pattern != NULL);
g_return_if_fail (gpp != NULL && gpp->pattern != NULL);
pattern_width = gpp->pattern->mask->width;
pattern_height = gpp->pattern->mask->height;

View File

@ -231,6 +231,10 @@ gimp_brush_preview_popup_open (GimpBrushPreview *gbp,
gint width, height;
guchar bg;
g_return_if_fail (gbp != NULL);
if (!gbp->brush)
return;
width = gbp->brush->mask->width;
height = gbp->brush->mask->height;
@ -334,7 +338,7 @@ gimp_brush_preview_draw (GimpBrushPreview *gbp)
guchar bg;
gint x, y;
g_return_if_fail (gbp->brush != NULL);
g_return_if_fail (gbp != NULL && gbp->brush != NULL);
brush_width = gbp->brush->mask->width;
brush_height = gbp->brush->mask->height;

View File

@ -205,6 +205,10 @@ gimp_pattern_preview_popup_open (GimpPatternPreview *gpp,
guchar *mask;
gint width, height;
g_return_if_fail (gpp != NULL);
if (!gpp->pattern)
return;
width = gpp->pattern->mask->width;
height = gpp->pattern->mask->height;
@ -296,7 +300,7 @@ gimp_pattern_preview_draw (GimpPatternPreview *gpp)
guchar *mask, *buf, *b;
gint x, y;
g_return_if_fail (gpp->pattern != NULL);
g_return_if_fail (gpp != NULL && gpp->pattern != NULL);
pattern_width = gpp->pattern->mask->width;
pattern_height = gpp->pattern->mask->height;

View File

@ -231,6 +231,10 @@ gimp_brush_preview_popup_open (GimpBrushPreview *gbp,
gint width, height;
guchar bg;
g_return_if_fail (gbp != NULL);
if (!gbp->brush)
return;
width = gbp->brush->mask->width;
height = gbp->brush->mask->height;
@ -334,7 +338,7 @@ gimp_brush_preview_draw (GimpBrushPreview *gbp)
guchar bg;
gint x, y;
g_return_if_fail (gbp->brush != NULL);
g_return_if_fail (gbp != NULL && gbp->brush != NULL);
brush_width = gbp->brush->mask->width;
brush_height = gbp->brush->mask->height;

View File

@ -231,6 +231,10 @@ gimp_brush_preview_popup_open (GimpBrushPreview *gbp,
gint width, height;
guchar bg;
g_return_if_fail (gbp != NULL);
if (!gbp->brush)
return;
width = gbp->brush->mask->width;
height = gbp->brush->mask->height;
@ -334,7 +338,7 @@ gimp_brush_preview_draw (GimpBrushPreview *gbp)
guchar bg;
gint x, y;
g_return_if_fail (gbp->brush != NULL);
g_return_if_fail (gbp != NULL && gbp->brush != NULL);
brush_width = gbp->brush->mask->width;
brush_height = gbp->brush->mask->height;