From c7b9f71d4e2a7feca6cf3849fd23a707e546643f Mon Sep 17 00:00:00 2001 From: Seth Burgess Date: Sun, 20 Sep 1998 18:00:13 +0000 Subject: [PATCH] Quick bug fix for gauss_iir --- ChangeLog | 4 ++++ plug-ins/common/gauss_iir.c | 5 +++++ plug-ins/gauss_iir/gauss_iir.c | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 95e91d4875..f7cc972d41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Sep 20 12:57:00 CST 1998 Seth Burgess + * plug-ins/gauss_iir/gauss_iir.c: Fixed segfault if neither + horizontal nor vertical was selected (as reported by Marc Lehman). + Sat Sep 19 01:19:18 BST 1998 Andy Thomas * app/blend.c app/brush_select.c app/brush_select.h app/bucket_fill.c diff --git a/plug-ins/common/gauss_iir.c b/plug-ins/common/gauss_iir.c index e43a3929db..0c1064a6a2 100644 --- a/plug-ins/common/gauss_iir.c +++ b/plug-ins/common/gauss_iir.c @@ -394,6 +394,11 @@ gauss_iir (GDrawable *drawable, guchar *guc_tmp1, *guc_tmp2; gint *gi_tmp1, *gi_tmp2; +/* Take care of the case that neither horizontal nor vertical is selected */ + if (!(horz || vert)) { + return; + } + gimp_drawable_mask_bounds (drawable->id, &x1, &y1, &x2, &y2); width = (x2 - x1); diff --git a/plug-ins/gauss_iir/gauss_iir.c b/plug-ins/gauss_iir/gauss_iir.c index e43a3929db..0c1064a6a2 100644 --- a/plug-ins/gauss_iir/gauss_iir.c +++ b/plug-ins/gauss_iir/gauss_iir.c @@ -394,6 +394,11 @@ gauss_iir (GDrawable *drawable, guchar *guc_tmp1, *guc_tmp2; gint *gi_tmp1, *gi_tmp2; +/* Take care of the case that neither horizontal nor vertical is selected */ + if (!(horz || vert)) { + return; + } + gimp_drawable_mask_bounds (drawable->id, &x1, &y1, &x2, &y2); width = (x2 - x1);