check that we have a stream before calling file-length
check that we have a stream before calling file-length

 * in decode stream, which is a bit of a misnomer, if cached-source-p
   was true, we would check for the cached source buffer, and if it
   didn't exist, we would attempt to create a cache buffer. But
   there's a (perhaps perverse) use case where decode-stream is called
   with a null-stream, but with a byte-reader that does the work. This
   is what retrospectiff uses to read JPEG encoded TIFF images. So, to
   guard against this, check that stream is not NIL before calling
   file-length on the stream. This will still file if one tries to
   pass in a non "stream associated with a file", but that seems less
   bad.

varjagg/cl-jpeg