diff --git a/panda/src/downloader/httpChannel.cxx b/panda/src/downloader/httpChannel.cxx index 42f6abc27e..861056c634 100644 --- a/panda/src/downloader/httpChannel.cxx +++ b/panda/src/downloader/httpChannel.cxx @@ -646,7 +646,7 @@ download_to_file(const Filename &filename, bool subdocument_resumes) { while (run()) { } - return is_download_complete(); + return is_download_complete() && is_valid(); } //////////////////////////////////////////////////////////////////// @@ -703,7 +703,7 @@ download_to_ram(Ramfile *ramfile, bool subdocument_resumes) { while (run()) { } - return is_download_complete(); + return is_download_complete() && is_valid(); } //////////////////////////////////////////////////////////////////// @@ -763,7 +763,7 @@ download_to_stream(ostream *strm, bool subdocument_resumes) { while (run()) { } - return is_download_complete(); + return is_download_complete() && is_valid(); } ////////////////////////////////////////////////////////////////////