Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java	(revision 34168)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java	(revision 34169)
@@ -249,5 +249,11 @@
 
             // Draw picture
-            g.drawImage(image, -image.getWidth(null) / 2, -image.getHeight(null) / 2, null);
+            int width = image.getWidth(null);
+            int height = image.getHeight(null);
+            try {
+                g.drawImage(image, -width / 2, -height / 2, null);
+            } catch (RuntimeException e) {
+                Logging.error(e);
+            }
 
             // Draw additional rectangle for the active pic layer
@@ -255,8 +261,8 @@
                 g.setColor(new Color(0xFF0000));
                 g.drawRect(
-                    -image.getWidth(null) / 2,
-                    -image.getHeight(null) / 2,
-                    image.getWidth(null),
-                    image.getHeight(null)
+                    -width / 2,
+                    -height / 2,
+                    width,
+                    height
                 );
             }
@@ -283,6 +289,5 @@
             }
         } else {
-            // TODO: proper logging
-            System.out.println("PicLayerAbstract::paint - general drawing error (image is null or Graphics not 2D");
+            Logging.error("PicLayerAbstract::paint - general drawing error (image is null or Graphics not 2D");
         }
     }
