Index: /applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java
===================================================================
--- /applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java	(revision 30059)
+++ /applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java	(revision 30060)
@@ -92,5 +92,5 @@
     // as we don't know its contents yet and therefore have a height of 0. This will
     // lead to unnecessary scrollbars.
-    private JMultilineLabel OutputDisplay = new JMultilineLabel(" ");
+    private JMultilineLabel outputDisplay = new JMultilineLabel(" ");
     private HistoryComboBox descriptionField;
     private HistoryComboBox tagsField;
@@ -162,6 +162,6 @@
         JPanel p = new JPanel(new GridBagLayout());
 
-        OutputDisplay.setMaxWidth(findMaxDialogSize().width-10);
-        p.add(OutputDisplay, GBC.eol());
+        outputDisplay.setMaxWidth(findMaxDialogSize().width-10);
+        p.add(outputDisplay, GBC.eol());
 
         p.add(tagsLabel, GBC.eol().insets(0,10,0,0));
@@ -179,5 +179,5 @@
 
     private void initTitleAndDescriptionFromGpxData(GpxData gpxData) {
-      String description, title, tags = "";
+      String description = "", title = "", tags = "";
       if (gpxData != null) {
           GpxTrack firstTrack = gpxData.tracks.iterator().next();
@@ -187,8 +187,10 @@
           } else if (firstTrack != null && gpxData.tracks.size() == 1 && firstTrack.get("desc") != null) {
               description = firstTrack.getString("desc");
-          } else {
+          } else if (gpxData.storageFile != null) {
               description = gpxData.storageFile.getName().replaceAll("[&?/\\\\]"," ").replaceAll("(\\.[^.]*)$","");
           }
-          title = tr("Selected track: {0}", gpxData.storageFile.getName());
+          if (gpxData.storageFile != null) {
+              title = tr("Selected track: {0}", gpxData.storageFile.getName());
+          }
           Object meta_tags = gpxData.attr.get(GpxConstants.META_KEYWORDS);
           if (meta_tags != null) {
@@ -200,5 +202,5 @@
           title = tr("No GPX layer selected. Cannot upload a trace.");
       }
-      OutputDisplay.setText(title);
+      outputDisplay.setText(title);
       descriptionField.setText(description);
       tagsField.setText(tags);
@@ -246,5 +248,5 @@
                 GuiHelper.runInEDT(new Runnable() {
                     @Override public void run() {
-                        OutputDisplay.setText(tr("Upload canceled"));
+                        outputDisplay.setText(tr("Upload canceled"));
                         buttons.get(0).setEnabled(true);
                     }
@@ -267,5 +269,5 @@
             GuiHelper.runInEDT(new Runnable() {
                 @Override public void run() {
-                    OutputDisplay.setText(tr("Error while uploading"));
+                    outputDisplay.setText(tr("Error while uploading"));
                 }
             });
@@ -325,5 +327,5 @@
         GuiHelper.runInEDT(new Runnable() {
             @Override public void run() {
-                OutputDisplay.setText(success
+                outputDisplay.setText(success
                         ? tr("GPX upload was successful")
                         : tr("Upload failed. Server returned the following message: ") + returnMsgEDT);
@@ -409,5 +411,5 @@
         GuiHelper.runInEDT(new Runnable() {
             @Override public void run() {
-                OutputDisplay.setText(errorsEDT);
+                outputDisplay.setText(errorsEDT);
             }
         });
