From 00cb465904f3a2f7febda41b19bbfe0dca8a1115 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:37:21 +0000 Subject: Guard against empty drop data git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@420 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../at/asit/pdfover/gui/composites/DataSourceSelectComposite.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pdf-over-gui/src/main') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java index a4835460..09457d35 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java @@ -203,6 +203,10 @@ public class DataSourceSelectComposite extends StateComposite { @Override public void drop(DropTargetEvent event) { if (fileTransfer.isSupportedType(event.currentDataType)) { + if (event.data == null) { + log.error("Dropped file name was null"); //$NON-NLS-1$ + return; + } String[] files = (String[]) event.data; if (files.length > 0) { // Only taking first file ... -- cgit v1.2.3