Skip to content

Commit

Permalink
Fix PeerConnection::checkFingerprint
Browse files Browse the repository at this point in the history
  • Loading branch information
paullouisageneau authored Jan 10, 2024
1 parent 42ec088 commit 97c273b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/impl/peerconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,11 @@ void PeerConnection::rollbackLocalDescription() {

bool PeerConnection::checkFingerprint(const std::string &fingerprint) const {
std::lock_guard lock(mRemoteDescriptionMutex);
auto expectedFingerprint = mRemoteDescription && mRemoteDescription->fingerprint() ? mRemoteDescription->fingerprint()->value : "";
if (expectedFingerprint == fingerprint) {
if (!mRemoteDescription || !mRemoteDescription->fingerprint())
return false;

auto expectedFingerprint = mRemoteDescription->fingerprint()->value;
if (expectedFingerprint == fingerprint) {
PLOG_VERBOSE << "Valid fingerprint \"" << fingerprint << "\"";
return true;
}
Expand Down

0 comments on commit 97c273b

Please sign in to comment.