Index: Source/core/frame/ImageBitmap.cpp |
diff --git a/Source/core/frame/ImageBitmap.cpp b/Source/core/frame/ImageBitmap.cpp |
index f2bb539b1b361fc3adca9ba245725b58cb258434..fabe5e39db7b86aa441c4e89dea8700605a4ec06 100644 |
--- a/Source/core/frame/ImageBitmap.cpp |
+++ b/Source/core/frame/ImageBitmap.cpp |
@@ -59,7 +59,12 @@ ImageBitmap::ImageBitmap(HTMLVideoElement* video, const IntRect& cropRect) |
, m_cropRect(cropRect) |
, m_bitmapOffset(IntPoint()) |
{ |
- IntRect videoRect = IntRect(IntPoint(), video->player()->naturalSize()); |
+ IntSize playerSize; |
+ |
+ if (video->webMediaPlayer()) |
+ playerSize = video->webMediaPlayer()->naturalSize(); |
+ |
+ IntRect videoRect = IntRect(IntPoint(), playerSize); |
IntRect srcRect = intersection(cropRect, videoRect); |
IntRect dstRect(IntPoint(), srcRect.size()); |