diff --git a/frame_serialize/CBORStream2Serializer.cpp b/frame_serialize/CBORStream2Serializer.cpp index c34872f7..97a2f8bd 100644 --- a/frame_serialize/CBORStream2Serializer.cpp +++ b/frame_serialize/CBORStream2Serializer.cpp @@ -675,7 +675,8 @@ void CBORStream2Serializer::SerializeSequenceEnd(const EndMessage& message) { CBOR_ENC(mapEncoder, "bkg_estimate", message.bkg_estimate); CBOR_ENC(mapEncoder, "rotation_lattice_type", message.rotation_lattice_type); - CBOR_ENC(mapEncoder, "rotation_lattice", message.rotation_lattice->GetVector()); + if (message.rotation_lattice.has_value()) + CBOR_ENC(mapEncoder, "rotation_lattice", message.rotation_lattice->GetVector()); CBOR_ENC(mapEncoder, "image_scale_factor", message.scale_factor); cborErr(cbor_encoder_close_container(&encoder, &mapEncoder));