Index: Source/modules/serviceworkers/ServiceWorker.cpp |
diff --git a/Source/modules/serviceworkers/ServiceWorker.cpp b/Source/modules/serviceworkers/ServiceWorker.cpp |
index 43c7506c95214bb9082f545862becb68f13e4aa3..b1de87b41bdaa829ed13beb2cea9383ad9f28c18 100644 |
--- a/Source/modules/serviceworkers/ServiceWorker.cpp |
+++ b/Source/modules/serviceworkers/ServiceWorker.cpp |
@@ -140,6 +140,9 @@ const AtomicString& ServiceWorker::state() const |
PassRefPtr<ServiceWorker> ServiceWorker::from(ExecutionContext* executionContext, WebType* worker) |
{ |
+ if (!worker) |
+ return PassRefPtr<ServiceWorker>(); |
+ |
blink::WebServiceWorkerProxy* proxy = worker->proxy(); |
ServiceWorker* existingServiceWorker = proxy ? proxy->unwrap() : 0; |
if (existingServiceWorker) { |