summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 9198e95c486..57206998170 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -1858,7 +1858,14 @@ Slice::Gen::HandleVisitor::visitClassDefStart(const ClassDefPtr& p)
C << nl << "::Ice::ObjectPrx proxy;";
// TODO: Should be ::Ice::__read
C << nl << "::IceInternal::read(__is, proxy);";
+ C << nl << "if (!proxy)";
+ C << sb;
+ C << nl << "v = 0;";
+ C << eb;
+ C << nl << "else";
+ C << sb;
C << nl << "v = new ::IceProxy" << scoped << ';';
C << nl << "proxy->__copyTo(v.get());";
C << eb;
+ C << eb;
}