summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cs/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cs/Gen.cpp')
-rwxr-xr-xcpp/src/slice2cs/Gen.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index a8dc6518f08..64c89c2f68f 100755
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -1980,7 +1980,10 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
_out << sb;
if(patchStruct)
{
+ _out << nl << "if(_pm == null)";
+ _out << sb;
_out << nl << "_pm = new __PatchMembers();";
+ _out << eb;
}
int classMemberCount = 0;
for(q = dataMembers.begin(); q != dataMembers.end(); ++q)