Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 3386)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 3387)
@@ -582,4 +582,8 @@
                 e.setPos(null);
             }
+        } catch (Exception ex) { // (other exceptions, e.g. #5271)
+            System.err.println("Error when reading EXIF from file: "+ex);
+            e.setExifCoor(null);
+            e.setPos(null);
         }
 
@@ -592,5 +596,8 @@
         } catch (CompoundException p) {
             direction = null;
-        }
+        } catch (Exception ex) {
+            direction = null;
+        }
+
         if (direction != null) {
             e.setExifImgDir(direction.doubleValue());
