fix: Crash when opening a file that cannot be mapped into memory
This commit is contained in:
parent
8cb833eca9
commit
4a5f1038e0
2
lib/external/libwolv
vendored
2
lib/external/libwolv
vendored
@ -1 +1 @@
|
||||
Subproject commit d25459dfa8e706af938427e979e454a8326c5984
|
||||
Subproject commit b3665a698d3484a992d820051d93286af750decf
|
@ -232,7 +232,11 @@ namespace hex::plugin::builtin {
|
||||
m_fileStats = file.getFileInfo();
|
||||
m_file = std::move(file);
|
||||
|
||||
m_file.map();
|
||||
if (!m_file.map()) {
|
||||
this->setErrorMessage(hex::format("hex.builtin.provider.file.error.open"_lang, m_path.string(), ::strerror(errno)));
|
||||
return false;
|
||||
}
|
||||
|
||||
m_fileSize = m_file.getSize();
|
||||
|
||||
m_file.close();
|
||||
|
Loading…
x
Reference in New Issue
Block a user