diff options
Diffstat (limited to 'cpp/src/Ice/StreamI.cpp')
-rw-r--r-- | cpp/src/Ice/StreamI.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cpp/src/Ice/StreamI.cpp b/cpp/src/Ice/StreamI.cpp index 26ecc8acb19..f992b99b76f 100644 --- a/cpp/src/Ice/StreamI.cpp +++ b/cpp/src/Ice/StreamI.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. @@ -698,7 +698,14 @@ Ice::UserExceptionWriter::~UserExceptionWriter() throw() void Ice::UserExceptionWriter::__write(BasicStream* os) const { - OutputStreamPtr stream = new OutputStreamI(_communicator, os); + OutputStreamI* stream = reinterpret_cast<OutputStreamI*>(os->closure()); + if(!stream) + { + // + // Required for IcePy usage + // + stream = new OutputStreamI(_communicator, os); + } write(stream); } |