gegl r3031 - trunk/gegl/graph



Author: martinn
Date: Sat Apr 11 14:50:06 2009
New Revision: 3031
URL: http://svn.gnome.org/viewvc/gegl?rev=3031&view=rev

Log:
Only accept pad connections when the sink pad is unconnected

Modified:
   trunk/gegl/graph/gegl-pad.c

Modified: trunk/gegl/graph/gegl-pad.c
==============================================================================
--- trunk/gegl/graph/gegl-pad.c	(original)
+++ trunk/gegl/graph/gegl-pad.c	Sat Apr 11 14:50:06 2009
@@ -111,8 +111,12 @@
 {
   GeglConnection *connection;
 
+  /* Both pads must be valid and the sink pad must not have any
+   * connections as input pads only can have one connection
+   */
   g_return_val_if_fail (GEGL_IS_PAD (sink), NULL);
   g_return_val_if_fail (GEGL_IS_PAD (source), NULL);
+  g_return_val_if_fail (sink->connections == NULL, NULL);
 
   connection = gegl_connection_new (NULL, sink, NULL, source);
 



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