CBOR: Handle rotation_lattice having no set value

This commit is contained in:
2026-02-28 16:55:08 +01:00
parent 0ba6f495d1
commit 64067f7430
+2 -1
View File
@@ -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));