From c10703c8ee4a2f6e0d02fe5d84a19580b7a7e0fa Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Tue, 11 Nov 2008 19:08:19 +0000 Subject: 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 --- qpid/cpp/src/qpid/sys/AggregateOutput.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'qpid/cpp/src') 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; } -- cgit v1.2.1