[PATCH 1/3] don't unpack empty lists to object's inlets

IOhannes m zmoelnig zmoelnig at iem.at
Thu Feb 28 10:05:45 CET 2013

since the list is empty, this will effectively be a no-op
(and thus an empty list is silently discarded).
better call the pd_defaultanything() method.
 src/m_class.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/m_class.c b/src/m_class.c
index bbc2fe7..3fb6d5c 100644
--- a/src/m_class.c
+++ b/src/m_class.c
@@ -132,7 +132,7 @@ static void pd_defaultlist(t_pd *x, t_symbol *s, int argc, t_atom *argv)
         /* if the object is patchable (i.e., can have proper inlets)
             send it on to obj_list which will unpack the list into the inlets */
-    else if ((*x)->c_patchable)
+    else if (argc>0 && (*x)->c_patchable)
         obj_list((t_object *)x, s, argc, argv);
             /* otherwise gove up and complain. */
     else pd_defaultanything(x, &s_list, argc, argv);

Content-Type: text/x-patch;
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;

More information about the Pd-list mailing list