Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 11319)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 11320)
@@ -1366,8 +1366,11 @@
      *
      * @param stream input stream
-     * @return byte array of data in input stream
+     * @return byte array of data in input stream or null if stream is null
      * @throws IOException if any I/O error occurs
      */
     public static byte[] readBytesFromStream(InputStream stream) throws IOException {
+        if (stream == null) {
+            return null;
+        }
         try {
             ByteArrayOutputStream bout = new ByteArrayOutputStream(stream.available());
