diff options
| author | Ricardo M. Correia <[email protected]> | 2011-04-23 01:26:16 +0200 |
|---|---|---|
| committer | Ricardo M. Correia <[email protected]> | 2011-04-23 01:40:23 +0200 |
| commit | a925c32cca224bf8d839fa420c524213c6cb340f (patch) | |
| tree | da2a77c9e7924af28aa9951b75f1b278e01a7738 | |
| parent | Better wording for transaction fee notification messages (diff) | |
| download | discoin-a925c32cca224bf8d839fa420c524213c6cb340f.tar.xz discoin-a925c32cca224bf8d839fa420c524213c6cb340f.zip | |
Fix segfault when we're unable to create the lock file.
| -rw-r--r-- | init.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -326,7 +326,7 @@ bool AppInit2(int argc, char* argv[]) // Make sure only a single bitcoin process is using the data directory. string strLockFile = GetDataDir() + "/.lock"; FILE* file = fopen(strLockFile.c_str(), "a"); // empty lock file; created if it doesn't exist. - fclose(file); + if (file) fclose(file); static boost::interprocess::file_lock lock(strLockFile.c_str()); if (!lock.try_lock()) { |