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 5f2b5a7af08209d10865e5562a07c4b49745ad10..8dd8b7d81e128e2c81270e7177f003a7055cf92f 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> |
@@ -1086,7 +1088,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. |