mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Fix crash if zip file cannot be opened (#14636)
Helped-by: savilli <78875209+savilli@users.noreply.github.com>
This commit is contained in:
parent
a8af0c0ca4
commit
57b6e74abb
2 changed files with 5 additions and 1 deletions
|
@ -932,6 +932,8 @@ bool extractZipFile(io::IFileSystem *fs, const char *filename, const std::string
|
|||
}
|
||||
|
||||
irr_ptr<io::IFileArchive> opened_zip(zip_loader->createArchive(filename, false, false));
|
||||
if (!opened_zip)
|
||||
return false;
|
||||
const io::IFileList* files_in_zip = opened_zip->getFileList();
|
||||
|
||||
for (u32 i = 0; i < files_in_zip->getFileCount(); i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue