summaryrefslogtreecommitdiff
path: root/lib/server/makeprotocol.pl.in
diff options
context:
space:
mode:
Diffstat (limited to 'lib/server/makeprotocol.pl.in')
-rwxr-xr-xlib/server/makeprotocol.pl.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/server/makeprotocol.pl.in b/lib/server/makeprotocol.pl.in
index 14b0b7b4..65d1f3a9 100755
--- a/lib/server/makeprotocol.pl.in
+++ b/lib/server/makeprotocol.pl.in
@@ -887,6 +887,13 @@ private:
public:
virtual std::auto_ptr<IOStream> ReceiveStream()
{
+ if(mStreamsToSend.empty())
+ {
+ THROW_EXCEPTION_MESSAGE(CommonException, Internal,
+ "Tried to ReceiveStream when none was sent or "
+ "made available");
+ }
+
std::auto_ptr<IOStream> apStream(mStreamsToSend.front());
mStreamsToSend.pop_front();
return apStream;