Fix potential crash when dragging in files on some systems

This might fix https://forums.zotero.org/discussion/57031
This commit is contained in:
Dan Stillman 2016-02-24 04:03:05 -05:00
parent 72302c8e24
commit d102e32f7d

View file

@ -2625,6 +2625,9 @@ Zotero.DragDrop = {
var files = []; var files = [];
for (var i=0; i<len; i++) { for (var i=0; i<len; i++) {
var file = dt.mozGetDataAt("application/x-moz-file", i); var file = dt.mozGetDataAt("application/x-moz-file", i);
if (!file) {
continue;
}
file.QueryInterface(Components.interfaces.nsIFile); file.QueryInterface(Components.interfaces.nsIFile);
// Don't allow folder drag // Don't allow folder drag
if (file.isDirectory()) { if (file.isDirectory()) {