gimp r26983 - in trunk: . app/pdb tools/pdbgen/pdb



Author: neo
Date: Wed Sep 17 22:52:06 2008
New Revision: 26983
URL: http://svn.gnome.org/viewvc/gimp?rev=26983&view=rev

Log:
2008-09-18  Sven Neumann  <sven gimp org>

	* tools/pdbgen/pdb/drawable.pdb: gimp_drawable_mask_intersect()
	and gimp_drawable_mask_bounds() may only be used on attached
	drawables. Added missing checks.

	* app/pdb/drawable-cmds.c: regenerated.



Modified:
   trunk/ChangeLog
   trunk/app/pdb/drawable-cmds.c
   trunk/tools/pdbgen/pdb/drawable.pdb

Modified: trunk/app/pdb/drawable-cmds.c
==============================================================================
--- trunk/app/pdb/drawable-cmds.c	(original)
+++ trunk/app/pdb/drawable-cmds.c	Wed Sep 17 22:52:06 2008
@@ -799,7 +799,10 @@
 
   if (success)
     {
-      non_empty = gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
+        non_empty = gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
+      else
+        success = FALSE;
     }
 
   return_vals = gimp_procedure_get_return_values (procedure, success,
@@ -838,7 +841,11 @@
 
   if (success)
     {
-      non_empty = gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height);
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
+        non_empty = gimp_drawable_mask_intersect (drawable,
+                                                  &x, &y, &width, &height);
+      else
+        success = FALSE;
     }
 
   return_vals = gimp_procedure_get_return_values (procedure, success,

Modified: trunk/tools/pdbgen/pdb/drawable.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/drawable.pdb	(original)
+++ trunk/tools/pdbgen/pdb/drawable.pdb	Wed Sep 17 22:52:06 2008
@@ -232,7 +232,10 @@
     %invoke = (
 	code => <<'CODE'
 {
-  non_empty = gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
+    non_empty = gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
+  else
+    success = FALSE;
 }
 CODE
     );
@@ -276,7 +279,11 @@
     %invoke = (
 	code => <<'CODE'
 {
-  non_empty = gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height);
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), error))
+    non_empty = gimp_drawable_mask_intersect (drawable,
+                                              &x, &y, &width, &height);
+  else
+    success = FALSE;
 }
 CODE
     );



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]