fix a regression when dragging and dropping files

@ussuri, fix an NPE regression that was visible when dragging and dropping files.