diff --git a/common/lc_library.cpp b/common/lc_library.cpp index e2f5ff2b..1feb7a6c 100644 --- a/common/lc_library.cpp +++ b/common/lc_library.cpp @@ -19,6 +19,7 @@ lcPiecesLibrary::lcPiecesLibrary() mNumOfficialPieces = 0; mZipFile = NULL; mCacheFile = NULL; + mCacheFileName[0] = 0; mSaveCache = false; } @@ -521,6 +522,9 @@ bool lcPiecesLibrary::OpenCache() { struct stat CacheStat; + if (!mCacheFileName[0]) + return false; + if (stat(mCacheFileName, &CacheStat) != 0 || mCacheFileModifiedTime != (lcuint64)CacheStat.st_mtime) return false;