Index: plug-ins/common/polar-coords.c
===================================================================
--- plug-ins/common/polar-coords.c	(revision 26319)
+++ plug-ins/common/polar-coords.c	(working copy)
@@ -203,13 +203,19 @@
   img_height    = gimp_drawable_height (drawable->drawable_id);
   img_has_alpha = gimp_drawable_has_alpha (drawable->drawable_id);
 
-  gimp_drawable_mask_bounds (drawable->drawable_id,
-                             &sel_x1, &sel_y1, &sel_x2, &sel_y2);
+  if(! gimp_drawable_mask_intersect (drawable->drawable_id,
+                                     &sel_x1, &sel_y1, &sel_width, &sel_height))
+    {
+      g_message (_("Region affected by plug-in is empty"));
+      return;
+    }
 
+  
+
   /* Calculate scaling parameters */
 
-  sel_width  = sel_x2 - sel_x1;
-  sel_height = sel_y2 - sel_y1;
+  sel_x2 = sel_x1 + sel_width;
+  sel_y2 = sel_y1 + sel_height;
 
   cen_x = (double) (sel_x1 + sel_x2 - 1) / 2.0;
   cen_y = (double) (sel_y1 + sel_y2 - 1) / 2.0;
Index: plug-ins/common/value-propagate.c
===================================================================
--- plug-ins/common/value-propagate.c	(revision 26319)
+++ plug-ins/common/value-propagate.c	(working copy)
@@ -440,10 +440,14 @@
     }
   else
     {
-      gimp_drawable_mask_bounds (drawable->drawable_id,
-                                 &begx, &begy, &endx, &endy);
-      width  = endx - begx;
-      height = endy - begy;
+      if(! gimp_drawable_mask_intersect (drawable->drawable_id,
+                                         &begx, &begy, &width, &height))
+        {
+          g_message (_("Region affected by plug-in is empty"));
+          return;
+        }
+      endx = begx + width;
+      endy = begy + height;
     }
 
   gimp_tile_cache_ntiles (2 * ((width) / gimp_tile_width () + 1));
Index: plug-ins/common/blinds.c
===================================================================
--- plug-ins/common/blinds.c	(revision 26319)
+++ plug-ins/common/blinds.c	(working copy)
@@ -568,11 +568,15 @@
 
   gimp_drawable_get_color_uchar (drawable->drawable_id, &background, bg);
 
-  gimp_drawable_mask_bounds (drawable->drawable_id,
-                             &sel_x1, &sel_y1, &sel_x2, &sel_y2);
+  if(! gimp_drawable_mask_intersect (drawable->drawable_id,
+                                     &sel_x1, &sel_y1, &sel_width, &sel_width))
+    {
+      g_message (_("Region affected by plug-in is empty"));
+      return;
+    }
 
-  sel_width  = sel_x2 - sel_x1;
-  sel_height = sel_y2 - sel_y1;
+  sel_x2 = sel_x1 + sel_width;
+  sel_y2 = sel_y1 + sel_height;
 
   gimp_pixel_rgn_init (&src_rgn, drawable,
                        sel_x1, sel_y1, sel_width, sel_height, FALSE, FALSE);
Index: plug-ins/common/pixelize.c
===================================================================
--- plug-ins/common/pixelize.c	(revision 26319)
+++ plug-ins/common/pixelize.c	(working copy)
@@ -459,10 +459,14 @@
     }
   else
     {
-      gimp_drawable_mask_bounds (drawable->drawable_id,
-                                 &x1, &y1, &x2, &y2);
-      width  = x2 - x1;
-      height = y2 - y1;
+      if(! gimp_drawable_mask_intersect (drawable->drawable_id,
+                                         &x1, &y1, &width, &height))
+        {
+          g_message(_("Region affected by plug-in is empty"));
+          return;
+        }
+      x2 = x1 + width;
+      y2 = y1 + height;
 
       /* Initialize progress */
       progress = 0;
@@ -616,10 +620,16 @@
 {
   GimpPixelRgn src_rgn, dest_rgn;
   gint         bpp, has_alpha;
-  gint         x1, y1, x2, y2;
+  gint         x1, y1, x2, y2, w, h;
   gint         progress, max_progress;
 
-  gimp_drawable_mask_bounds (drawable->drawable_id, &x1, &y1, &x2, &y2);
+  if(! gimp_drawable_mask_intersect (drawable->drawable_id, &x1, &y1, &w, &h))
+    {
+      g_message(_("Region affected by plug-in is empty"));
+      return;
+    }
+  x2 = x1 + w;
+  y2 = y1 + h;
   gimp_pixel_rgn_init (&src_rgn, drawable, x1, y1, x2-x1, y2-y1, FALSE, FALSE);
   gimp_pixel_rgn_init (&dest_rgn, drawable, x1, y1, x2-x1, y2-y1, TRUE, TRUE);
 
Index: plug-ins/common/despeckle.c
===================================================================
--- plug-ins/common/despeckle.c	(revision 26319)
+++ plug-ins/common/despeckle.c	(working copy)
@@ -377,10 +377,15 @@
   gint          x1, y1 ,x2 ,y2;
 
   img_bpp = gimp_drawable_bpp (drawable->drawable_id);
-  gimp_drawable_mask_bounds (drawable->drawable_id, &x1, &y1, &x2, &y2);
+  if(! gimp_drawable_mask_intersect (drawable->drawable_id,
+                                     &x1, &y1, &width, &height))
+    {
+      g_message(_("Region affected by plug-in is empty"));
+      return;
+    }
 
-  width  = x2 - x1;
-  height = y2 - y1;
+  x2 = x1 + width;
+  y2 = y1 + height;
 
   gimp_pixel_rgn_init (&src_rgn, drawable, x1, y1, width, height, FALSE, FALSE);
   gimp_pixel_rgn_init (&dst_rgn, drawable, x1, y1, width, height, TRUE, TRUE);
Index: plug-ins/common/sharpen.c
===================================================================
--- plug-ins/common/sharpen.c	(revision 26319)
+++ plug-ins/common/sharpen.c	(working copy)
@@ -294,11 +294,15 @@
 
   filter = NULL;
 
-  gimp_drawable_mask_bounds (drawable->drawable_id,
-                             &x1, &y1, &x2, &y2);
+  if(! gimp_drawable_mask_intersect (drawable->drawable_id,
+                                     &x1, &y1, &sel_width, &sel_height))
+    {
+      g_message (_("Region affected by plug-in is empty"));
+      return;
+    }
 
-  sel_width  = x2 - x1;
-  sel_height = y2 - y1;
+  x2 = x1 + sel_width;
+  y2 = y1 + sel_height;
   img_bpp    = gimp_drawable_bpp (drawable->drawable_id);
 
   /*
Index: plug-ins/common/blur.c
===================================================================
--- plug-ins/common/blur.c	(revision 26319)
+++ plug-ins/common/blur.c	(working copy)
@@ -251,7 +251,16 @@
   gint          ind;
   gboolean      has_alpha;
 
-  gimp_drawable_mask_bounds (drawable->drawable_id, &x1, &y1, &x2, &y2);
+  if(! gimp_drawable_mask_intersect (drawable->drawable_id,
+                                     &x1, &y1, &width, &height))
+    {
+      g_message(_("Region affected by plug-in is empty"));
+      return;
+    }
+
+  x2 = x1 + width;
+  y2 = y1 + height;
+
   /*
    *  Get the size of the input image. (This will/must be the same
    *  as the size of the output image.  Also get alpha info.
Index: plug-ins/common/warp.c
===================================================================
--- plug-ins/common/warp.c	(revision 26319)
+++ plug-ins/common/warp.c	(working copy)
@@ -739,7 +739,10 @@
 
   if (! gimp_drawable_mask_intersect (drawable->drawable_id,
                                       &x1, &y1, &width, &height))
-    return;
+    {
+      g_message (_("Region affected by plug-in is empty"));
+      return;
+    }
 
   x2 = x1 + width;
   y2 = y1 + height;
@@ -914,7 +917,10 @@
    */
   if (! gimp_drawable_mask_intersect (drawable->drawable_id,
                                       &x1, &y1, &width, &height))
-    return;
+    {
+      g_message (_("Region affected by plug-in is empty"));
+      return;
+    }
 
   x2 = x1 + width;
   y2 = y1 + height;
@@ -1233,7 +1239,10 @@
   /* Get selection area */
   if (! gimp_drawable_mask_intersect (orig_draw->drawable_id,
                                       &x1, &y1, &width, &height))
-    return;
+    {
+      g_message (_("Region affected by plug-in is empty"));
+      return;
+    }
 
   x2 = x1 + width;
   y2 = y1 + height;
@@ -1351,9 +1360,15 @@
 
   /* Get selection area */
 
-  if (! gimp_drawable_mask_intersect (draw->drawable_id, &x1, &y1, &x2, &y2))
-    return;
+  if (! gimp_drawable_mask_intersect (draw->drawable_id, &x1, &y1, &width, &height))
+    {
+      g_message (_("Region affected by plug-in is empty"));
+      return;
+    }
 
+  x2 = x1 + width;
+  y2 = y1 + height;
+
    width  = draw->width;
    height = draw->height;
    dest_bytes  = draw->bpp;
Index: plug-ins/common/iwarp.c
===================================================================
--- plug-ins/common/iwarp.c	(revision 26319)
+++ plug-ins/common/iwarp.c	(working copy)
@@ -178,14 +178,14 @@
                                            gint       xx,
                                            gint       yy);
 
-static void     iwarp_scale_preview       (gint       new_width,
+static void      iwarp_scale_preview      (gint       new_width,
                                            gint       new_height,
                                            gint       old_width,
                                            gint       old_height);
-static void     iwarp_preview_build       (GtkWidget *vbox);
+static void      iwarp_preview_build       (GtkWidget *vbox);
 
-static void     iwarp_init                (void);
-static void     iwarp_preview_init        (void);
+static gboolean  iwarp_init               (void);
+static void      iwarp_preview_init       (void);
 
 
 
@@ -961,15 +961,21 @@
   g_free (linebuffer);
 }
 
-static void
+static gboolean
 iwarp_init (void)
 {
   gint  i;
 
-  gimp_drawable_mask_bounds (drawable->drawable_id, &xl, &yl, &xh, &yh);
-  sel_width = xh - xl;
-  sel_height = yh - yl;
+  if(! gimp_drawable_mask_intersect (drawable->drawable_id,
+                                     &xl, &yl, &sel_width, &sel_height))
+    {
+      g_message (_("Region affected by plug-in is empty"));
+      return FALSE;
+    }
 
+  xh = xl + sel_width;
+  yh = yl + sel_height;
+
   image_bpp = gimp_drawable_bpp (drawable->drawable_id);
 
   if (gimp_drawable_is_layer (drawable->drawable_id))
@@ -998,6 +1004,8 @@
         pow ((cos (sqrt((gdouble) i / MAX_DEFORM_AREA_RADIUS) * G_PI) + 1) *
              0.5, 0.7); /*0.7*/
     }
+
+  return TRUE;
 }
 
 static void
@@ -1258,7 +1266,8 @@
 
   gimp_ui_init (PLUG_IN_BINARY, TRUE);
 
-  iwarp_init ();
+  if(! iwarp_init ())
+    return FALSE;
 
   dlg = gimp_dialog_new (_("IWarp"), PLUG_IN_BINARY,
                          NULL, 0,
Index: plug-ins/common/blur-gauss-selective.c
===================================================================
--- plug-ins/common/blur-gauss-selective.c	(revision 26319)
+++ plug-ins/common/blur-gauss-selective.c	(working copy)
@@ -740,10 +740,15 @@
   gdouble     *mat;
   gint         numrad;
 
-  gimp_drawable_mask_bounds (drawable->drawable_id, &x1, &y1, &x2, &y2);
+  if(! gimp_drawable_mask_intersect (drawable->drawable_id,
+                                     &x1, &y1, &width, &height))
+    {
+      g_message (_("Region affected by plug-in is empty"));
+      return;
+    }
 
-  width     = x2 - x1;
-  height    = y2 - y1;
+  x2        = x1 + width;
+  y2        = y1 + height;
   bytes     = drawable->bpp;
   has_alpha = gimp_drawable_has_alpha (drawable->drawable_id);
 
Index: plug-ins/common/mosaic.c
===================================================================
--- plug-ins/common/mosaic.c	(revision 26319)
+++ plug-ins/common/mosaic.c	(working copy)
@@ -495,10 +495,14 @@
     }
   else
     {
-      gimp_drawable_mask_bounds (drawable->drawable_id, &x1, &y1, &x2, &y2);
-      width  = (x2 - x1);
-      height = (y2 - y1);
-
+      if(! gimp_drawable_mask_intersect (drawable->drawable_id,
+                                         &x1, &y1, &width, &height))
+        {
+          g_message (_("Region affected by plug-in is empty"));
+          return;
+        }
+      x2 = x1 + width;
+      y2 = y1 + height;
       /*  progress bar for gradient finding  */
       gimp_progress_init (_("Finding edges"));
     }
Index: plug-ins/common/deinterlace.c
===================================================================
--- plug-ins/common/deinterlace.c	(revision 26319)
+++ plug-ins/common/deinterlace.c	(working copy)
@@ -205,13 +205,13 @@
     }
   else
     {
-      gint x2, y2;
+      if(! gimp_drawable_mask_intersect (drawable->drawable_id,
+                                         &x, &y, &width, &height))
+        {
+          g_message (_("Region affected by plug-in is empty"));
+          return;
+        }
 
-      gimp_drawable_mask_bounds (drawable->drawable_id, &x, &y, &x2, &y2);
-
-      width  = x2 - x;
-      height = y2 - y;
-
       dest = g_new (guchar, width * bytes);
 
       gimp_pixel_rgn_init (&destPR, drawable, x, y, width, height, TRUE, TRUE);
