summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/StreamI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/StreamI.cpp')
-rw-r--r--cpp/src/Ice/StreamI.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/Ice/StreamI.cpp b/cpp/src/Ice/StreamI.cpp
index 26ecc8acb19..4e5bd68c231 100644
--- a/cpp/src/Ice/StreamI.cpp
+++ b/cpp/src/Ice/StreamI.cpp
@@ -698,7 +698,8 @@ Ice::UserExceptionWriter::~UserExceptionWriter() throw()
void
Ice::UserExceptionWriter::__write(BasicStream* os) const
{
- OutputStreamPtr stream = new OutputStreamI(_communicator, os);
+ OutputStreamI* stream = reinterpret_cast<OutputStreamI*>(os->closure());
+ assert(stream);
write(stream);
}