Index: /applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustWorker.java
===================================================================
--- /applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustWorker.java	(revision 31412)
+++ /applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustWorker.java	(revision 31413)
@@ -166,4 +166,8 @@
                                 MouseEvent evt) {
         final LatLon photoLL = photo.getPos();
+        if (photoLL == null) {
+            // Direction cannot be set if image doesn't have a position.
+            return;
+        }
         final LatLon mouseLL = Main.map.mapView.getLatLon(evt.getX(), evt.getY());
         // The projection doesn't matter here.
