Index: third_party/WebKit/Source/core/page/DragController.cpp |
diff --git a/third_party/WebKit/Source/core/page/DragController.cpp b/third_party/WebKit/Source/core/page/DragController.cpp |
index 25bb2766bf30cd9a58a8ece2b74f73aa08a7c43d..bbe7e5c1e3bd0709acf1a4fdc25bd39fb57bb3af 100644 |
--- a/third_party/WebKit/Source/core/page/DragController.cpp |
+++ b/third_party/WebKit/Source/core/page/DragController.cpp |
@@ -69,6 +69,7 @@ |
#include "core/page/DragState.h" |
#include "core/page/Page.h" |
#include "platform/DragImage.h" |
+#include "platform/SharedBuffer.h" |
#include "platform/geometry/IntRect.h" |
#include "platform/geometry/IntSize.h" |
#include "platform/graphics/BitmapImage.h" |
@@ -84,6 +85,7 @@ |
#include "public/platform/WebScreenInfo.h" |
#include "wtf/Assertions.h" |
#include "wtf/CurrentTime.h" |
+#include "wtf/PassRefPtr.h" |
#include "wtf/RefPtr.h" |
#include <memory> |
@@ -1062,7 +1064,7 @@ bool DragController::startDrag(LocalFrame* src, |
return false; |
Element* element = toElement(node); |
Image* image = getImage(element); |
- if (!image || image->isNull()) |
+ if (!image || image->isNull() || !image->data() || !image->data()->size()) |
return false; |
// We shouldn't be starting a drag for an image that can't provide an |
// extension. |