diff options
author | lloyd <[email protected]> | 2014-02-17 15:26:00 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-02-17 15:26:00 +0000 |
commit | 021203aa782f3aa514dd9f3e4f129c06692d37e2 (patch) | |
tree | 84f710ffec8d47a23cb6d0339d2492da91828864 /src | |
parent | b5b19f315216ef6c1dc09d6846d995062cf039f0 (diff) |
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).
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/filters/filter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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]) |