diff --git a/src/impl/peerconnection.cpp b/src/impl/peerconnection.cpp index 05012cdc1..943da6752 100644 --- a/src/impl/peerconnection.cpp +++ b/src/impl/peerconnection.cpp @@ -212,9 +212,8 @@ shared_ptr PeerConnection::initDtlsTransport() { PLOG_VERBOSE << "Starting DTLS transport"; auto fingerprintAlgorithm = CertificateFingerprint::Algorithm::Sha256; - if (auto remote = remoteDescription(); - remote && remote->fingerprint().has_value()) { - fingerprintAlgorithm = remote->fingerprint().value().algorithm; + if (auto remote = remoteDescription(); remote && remote->fingerprint()) { + fingerprintAlgorithm = remote->fingerprint()->algorithm; } auto lower = std::atomic_load(&mIceTransport);