mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Fix server crash when nvault is writting to journal file without write permission (bug 3231, r=Arkshine)
This commit is contained in:
parent
28aa4dfbf7
commit
6ad9e6bc8c
@ -129,7 +129,9 @@ bool Journal::Begin()
|
|||||||
|
|
||||||
bool Journal::End()
|
bool Journal::End()
|
||||||
{
|
{
|
||||||
fclose(m_fp);
|
if (m_fp)
|
||||||
|
fclose(m_fp);
|
||||||
|
|
||||||
m_Bw.SetFilePtr(NULL);
|
m_Bw.SetFilePtr(NULL);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -266,8 +266,13 @@ bool NVault::Close()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
_SaveToFile();
|
_SaveToFile();
|
||||||
m_Journal->End();
|
|
||||||
m_Journal->Erase();
|
if (m_Journal)
|
||||||
|
{
|
||||||
|
m_Journal->End();
|
||||||
|
m_Journal->Erase();
|
||||||
|
}
|
||||||
|
|
||||||
m_Open = false;
|
m_Open = false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user