From 021203aa782f3aa514dd9f3e4f129c06692d37e2 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 17 Feb 2014 15:26:00 +0000 Subject: Transformation_Filter calls send() inside of start_msg() which means that any filters which follow in the pipe will get write() called on them before start_msg(), causing confusion and/or crashes. This patch fixes it for the case when start() returns an empty vector which covers all current use cases. I'll have to figure out another approach for the general case (or decide the general case isn't worth supporting and remove the return value from start). --- src/lib/filters/filter.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lib') diff --git a/src/lib/filters/filter.cpp b/src/lib/filters/filter.cpp index 3eb924172..de678f537 100644 --- a/src/lib/filters/filter.cpp +++ b/src/lib/filters/filter.cpp @@ -27,6 +27,9 @@ Filter::Filter() */ void Filter::send(const byte input[], size_t length) { + if(!length) + return; + bool nothing_attached = true; for(size_t j = 0; j != total_ports(); ++j) if(next[j]) -- cgit v1.2.3