diff --git a/src/streams.h b/src/streams.h index 5dbcfaf21..24051e11d 100644 --- a/src/streams.h +++ b/src/streams.h @@ -566,7 +566,7 @@ public: // check whether we're at the end of the source file bool eof() const { - return nReadPos == nSrcPos && feof(src); + return src == NULL || (nReadPos == nSrcPos && feof(src)); } // read a number of bytes