summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-11-11 19:08:19 +0000
committerGordon Sim <gsim@apache.org>2008-11-11 19:08:19 +0000
commitc10703c8ee4a2f6e0d02fe5d84a19580b7a7e0fa (patch)
tree5779cf13b1b4eee279f2d46a7737a0cd57bca001
parent3d00ce05395f5196ae576762090db2a6f701fc42 (diff)
downloadqpid-python-c10703c8ee4a2f6e0d02fe5d84a19580b7a7e0fa.tar.gz
handle case where doOutput call causes last task to be removed.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@713114 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/sys/AggregateOutput.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/sys/AggregateOutput.cpp b/qpid/cpp/src/qpid/sys/AggregateOutput.cpp
index d2c4b7185e..849e2bacfb 100644
--- a/qpid/cpp/src/qpid/sys/AggregateOutput.cpp
+++ b/qpid/cpp/src/qpid/sys/AggregateOutput.cpp
@@ -47,6 +47,7 @@ bool AggregateOutput::doOutput()
//loop until a task generated some output
while (!result) {
result = tasks[next++]->doOutput();
+ if (tasks.empty()) break;
if (next >= tasks.size()) next = next % tasks.size();
if (start == next) break;
}