Commit 4cc07b0d authored by Taylor Brandstetter's avatar Taylor Brandstetter Committed by Commit Bot

Avoid dereferencing null pointer if generateCertificate fails.

Bug: chromium:820806
Change-Id: I36340c31ee6c5c88a4049d346ed9af9dbff43392
Reviewed-on: https://chromium-review.googlesource.com/959525Reviewed-by: default avatarHenrik Boström <hbos@chromium.org>
Commit-Queue: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542812}
parent b28c3398
...@@ -93,7 +93,9 @@ class RTCCertificateGeneratorRequest ...@@ -93,7 +93,9 @@ class RTCCertificateGeneratorRequest
FROM_HERE, FROM_HERE,
base::BindOnce(&RTCCertificateGeneratorRequest::DoCallbackOnMainThread, base::BindOnce(&RTCCertificateGeneratorRequest::DoCallbackOnMainThread,
this, std::move(observer), this, std::move(observer),
std::make_unique<RTCCertificate>(certificate))); certificate
? std::make_unique<RTCCertificate>(certificate)
: nullptr));
} }
void DoCallbackOnMainThread( void DoCallbackOnMainThread(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment