diff --git a/src/common/fs_zip.cpp b/src/common/fs_zip.cpp index 9f40072133..c9a379ce13 100644 --- a/src/common/fs_zip.cpp +++ b/src/common/fs_zip.cpp @@ -109,9 +109,12 @@ wxFSFile* wxZipFSHandler::OpenFile(wxFileSystem& fs, const wxString& location) s = new wxZipFSInputStream(leftFile); if (s && s->IsOk()) { - wxZipEntry *ent; bool found = false; - while (!found && (ent = s->GetNextEntry())) { + while (!found) + { + wxZipEntry *ent = s->GetNextEntry(); + if (!ent) + break; if (ent->GetInternalName() == right) found = true; delete ent;