Index: third_party/WebKit/Source/core/css/FontFaceSet.cpp |
diff --git a/third_party/WebKit/Source/core/css/FontFaceSet.cpp b/third_party/WebKit/Source/core/css/FontFaceSet.cpp |
index 44228468db9f65f7681215fe8d5ec67c0325f9e0..2bfcc11755c9a5b280fc2aabde93209043a88973 100644 |
--- a/third_party/WebKit/Source/core/css/FontFaceSet.cpp |
+++ b/third_party/WebKit/Source/core/css/FontFaceSet.cpp |
@@ -348,11 +348,13 @@ void FontFaceSet::fireDoneEventIfPossible() |
return; |
if (!shouldSignalReady()) |
return; |
+ Document* d = document(); |
+ if (!d) |
+ return; |
// If the layout was invalidated in between when we thought layout |
// was updated and when we're ready to fire the event, just wait |
// until after the next layout before firing events. |
- Document* d = document(); |
if (!d->view() || d->view()->needsLayout()) |
return; |