diff options
Diffstat (limited to 'src/tosa_serialization_handler.cpp')
-rw-r--r-- | src/tosa_serialization_handler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tosa_serialization_handler.cpp b/src/tosa_serialization_handler.cpp index d782213..25ac5df 100644 --- a/src/tosa_serialization_handler.cpp +++ b/src/tosa_serialization_handler.cpp @@ -26,7 +26,10 @@ TosaSerializationTensor::TosaSerializationTensor(const flatbuffers::String* name { _dtype = dtype; - std::copy(shape->begin(), shape->end(), std::back_inserter(_shape)); + if (shape) + { + std::copy(shape->begin(), shape->end(), std::back_inserter(_shape)); + } assert(name); _name = name->str(); |