| Index: third_party/WebKit/Source/modules/presentation/Presentation.cpp
|
| diff --git a/third_party/WebKit/Source/modules/presentation/Presentation.cpp b/third_party/WebKit/Source/modules/presentation/Presentation.cpp
|
| index 6d38d46fd71a7daf4d619eb8b04f2cb361d8330f..aa15f73e031d3796661a692a3ff9141cf974984c 100644
|
| --- a/third_party/WebKit/Source/modules/presentation/Presentation.cpp
|
| +++ b/third_party/WebKit/Source/modules/presentation/Presentation.cpp
|
| @@ -48,13 +48,16 @@ void Presentation::setDefaultRequest(PresentationRequest* request) {
|
| }
|
|
|
| PresentationReceiver* Presentation::receiver() {
|
| - PresentationController* controller = PresentationController::from(*frame());
|
| - auto* client = controller ? controller->client() : nullptr;
|
| + if (!frame())
|
| + return nullptr;
|
| // TODO(crbug.com/647296): only return something if the Blink instance is
|
| // running in presentation receiver mode. The flag PresentationReceiver could
|
| // be used for that.
|
| - if (!m_receiver)
|
| + if (!m_receiver) {
|
| + PresentationController* controller = PresentationController::from(*frame());
|
| + auto* client = controller ? controller->client() : nullptr;
|
| m_receiver = new PresentationReceiver(frame(), client);
|
| + }
|
| return m_receiver;
|
| }
|
|
|
|
|