mirror of
https://github.com/reswitched/Mephisto.git
synced 2024-06-06 07:08:41 -04:00
~IFile: only close files if we actually opened them (fixes heisensegfault)
This commit is contained in:
parent
b2b6a831f2
commit
355af21785
|
@ -356,7 +356,9 @@ nn::fssrv::sf::IFile::IFile(Ctu *_ctu, string _fn, uint32_t _mode) : IpcServic
|
|||
}
|
||||
|
||||
nn::fssrv::sf::IFile::~IFile() {
|
||||
fclose((FILE*)fp);
|
||||
if(isOpen) {
|
||||
fclose((FILE*)fp);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t nn::fssrv::sf::IFile::GetSize(OUT uint64_t& fileSize) {
|
||||
|
|
Loading…
Reference in a new issue