diff --git a/dlls/nvault/Journal.cpp b/dlls/nvault/Journal.cpp index 9d4021f7..c980fb2d 100755 --- a/dlls/nvault/Journal.cpp +++ b/dlls/nvault/Journal.cpp @@ -129,7 +129,9 @@ bool Journal::Begin() bool Journal::End() { - fclose(m_fp); + if (m_fp) + fclose(m_fp); + m_Bw.SetFilePtr(NULL); return true; } diff --git a/dlls/nvault/NVault.cpp b/dlls/nvault/NVault.cpp index 8bea86b3..4546f02c 100755 --- a/dlls/nvault/NVault.cpp +++ b/dlls/nvault/NVault.cpp @@ -266,8 +266,13 @@ bool NVault::Close() return false; _SaveToFile(); - m_Journal->End(); - m_Journal->Erase(); + + if (m_Journal) + { + m_Journal->End(); + m_Journal->Erase(); + } + m_Open = false; return true;