Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 2648)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 2649)
@@ -104,5 +104,5 @@
     }
 
-    Vector gpxLst = new Vector();
+    Vector<GpxDataWrapper> gpxLst = new Vector<GpxDataWrapper>();
     JPanel panel = null;
     JComboBox cbGpx = null;
@@ -145,18 +145,16 @@
 
                 for (int i = gpxLst.size() - 1 ; i >= 0 ; i--) {
-                    if (gpxLst.get(i) instanceof GpxDataWrapper) {
-                        GpxDataWrapper wrapper = (GpxDataWrapper) gpxLst.get(i);
-                        if (sel.equals(wrapper.file)) {
-                            cbGpx.setSelectedIndex(i);
-                            if (!sel.getName().equals(wrapper.name)) {
-                                JOptionPane.showMessageDialog(
-                                        Main.parent,
-                                        tr("File {0} is loaded yet under the name \"{1}\"", sel.getName(), wrapper.name),
-                                        tr("Error"),
-                                        JOptionPane.ERROR_MESSAGE
-                                );
-                            }
-                            return;
+                    GpxDataWrapper wrapper = gpxLst.get(i);
+                    if (wrapper.file != null && sel.equals(wrapper.file)) {
+                        cbGpx.setSelectedIndex(i);
+                        if (!sel.getName().equals(wrapper.name)) {
+                            JOptionPane.showMessageDialog(
+                                    Main.parent,
+                                    tr("File {0} is loaded yet under the name \"{1}\"", sel.getName(), wrapper.name),
+                                    tr("Error"),
+                                    JOptionPane.ERROR_MESSAGE
+                            );
                         }
+                        return;
                     }
                 }
@@ -193,5 +191,5 @@
 
                 loadedGpxData.add(data);
-                if (gpxLst.get(0) instanceof String) {
+                if (gpxLst.get(0).file == null) {
                     gpxLst.remove(0);
                 }
@@ -279,5 +277,5 @@
             panelTf.add(new JLabel(tr("I'm in the timezone of: ")), gc);
 
-            Vector vtTimezones = new Vector<String>();
+            Vector<String> vtTimezones = new Vector<String>();
             String[] tmp = TimeZone.getAvailableIDs();
 
@@ -441,5 +439,4 @@
                 gpxLst.add(gdw);
                 if (cur == yLayer.gpxLayer) {
-                    System.err.println("Hier!");
                     defaultItem = gdw;
                 }
@@ -453,5 +450,5 @@
 
         if (gpxLst.size() == 0) {
-            gpxLst.add(tr("<No GPX track loaded yet>"));
+            gpxLst.add(new GpxDataWrapper(tr("<No GPX track loaded yet>"), null, null));
         }
 
