diff --git a/libraries/ZWidget/src/core/widget.cpp b/libraries/ZWidget/src/core/widget.cpp index 7ddc1ca59..93a41fbc7 100644 --- a/libraries/ZWidget/src/core/widget.cpp +++ b/libraries/ZWidget/src/core/widget.cpp @@ -564,7 +564,7 @@ void Widget::OnWindowMouseMove(const Point& pos) { widget->OnMouseMove(widget->MapFrom(this, pos)); widget = widget->Parent(); - } while (widget != this); + } while (widget != this && widget != nullptr); } } diff --git a/source/common/filesystem/source/files_decompress.cpp b/source/common/filesystem/source/files_decompress.cpp index 95cce3c33..9d00ee6df 100644 --- a/source/common/filesystem/source/files_decompress.cpp +++ b/source/common/filesystem/source/files_decompress.cpp @@ -980,7 +980,7 @@ bool OpenDecompressor(FileReader& self, FileReader &parent, FileReader::Size len } dec->Length = length; } - if ((flags & DCF_CACHED)) + if ((flags & (DCF_CACHED| DCF_SEEKABLE))) // the buffering reader does not seem to be stable, so cache it instead until we find out what's wrong. { // read everything into a MemoryArrayReader. FileData data(nullptr, length); diff --git a/source/common/filesystem/source/filesystem.cpp b/source/common/filesystem/source/filesystem.cpp index a8418956f..fee5f1011 100644 --- a/source/common/filesystem/source/filesystem.cpp +++ b/source/common/filesystem/source/filesystem.cpp @@ -395,7 +395,7 @@ void FileSystem::AddFile (const char *filename, FileReader *filer, LumpFilterInf std::string path = filename; path += ':'; path += resfile->getName(i); - auto embedded = resfile->GetEntryReader(i, READER_NEW, READERFLAG_SEEKABLE); + auto embedded = resfile->GetEntryReader(i, READER_CACHED); AddFile(path.c_str(), &embedded, filter, Printf, hashfile); } }