Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 6291)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 6292)
@@ -532,6 +532,8 @@
 
         try {
-            int orientation = dirExif.getInt(ExifIFD0Directory.TAG_ORIENTATION);
-            e.setExifOrientation(orientation);
+            if (dirExif != null) {
+                int orientation = dirExif.getInt(ExifIFD0Directory.TAG_ORIENTATION);
+                e.setExifOrientation(orientation);
+            }
         } catch (MetadataException ex) {
         }
