summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Slice/CsUtil.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp
index b67c237b235..a98260e7e27 100644
--- a/cpp/src/Slice/CsUtil.cpp
+++ b/cpp/src/Slice/CsUtil.cpp
@@ -889,7 +889,12 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
{
out << nl << stream << ".write" << func << "Seq(" << param << ");";
}
- else if(isCustom || isCollection)
+ else if(isCollection)
+ {
+ out << nl << stream << ".write" << func << "Seq(" << param << " == null ? null : "
+ << param << ".ToArray());";
+ }
+ else if(isCustom)
{
if(streamingAPI)
{