When dragging message form email client on Windows, item.webkitGetAsEntry() might return null creating NPE on the client side. Added additional checks for this situation. Change-Id: I569f7e6d0d7b137f24be53d1fbce384695ae8c73reviewable/pr7969/r3
@@ -90,8 +90,11 @@ public class VHtml5DragEvent extends NativeEvent { | |||
// Chrome >= v21 and Opera >= v? | |||
if (this.dataTransfer.items) { | |||
var item = this.dataTransfer.items[fileIndex]; | |||
if (item.webkitGetAsEntry) { | |||
return item.webkitGetAsEntry().isFile; | |||
if (typeof item.webkitGetAsEntry == "function") { | |||
var entry = item.webkitGetAsEntry(); | |||
if (typeof entry !== "undefined" && entry !== null) { | |||
return entry.isFile; | |||
} | |||
} | |||
} | |||