Browse Source

Merge pull request #2057 from Diapolo/FlushBlockFile

FlushBlockFile(): check for valid FILE pointer
miguelfreitas
Pieter Wuille 12 years ago
parent
commit
d79775a04d
  1. 4
      src/main.cpp

4
src/main.cpp

@ -1538,12 +1538,16 @@ void static FlushBlockFile() @@ -1538,12 +1538,16 @@ void static FlushBlockFile()
CDiskBlockPos posOld(nLastBlockFile, 0);
FILE *fileOld = OpenBlockFile(posOld);
if (fileOld) {
FileCommit(fileOld);
fclose(fileOld);
}
fileOld = OpenUndoFile(posOld);
if (fileOld) {
FileCommit(fileOld);
fclose(fileOld);
}
}
bool FindUndoPos(int nFile, CDiskBlockPos &pos, unsigned int nAddSize);

Loading…
Cancel
Save