X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsyzygy%2Ftbprobe.cpp;h=cc5e2852a09106d2c4b2a051cc5be6f61710d378;hb=fcee83810a5bcf774d3e13cf9e65ccf3b29e3319;hp=b7ba32407456f810b0354c4bc920d8c5c839fdfb;hpb=4101893a28b4d34262ed1fba10f2365e964b6537;p=stockfish diff --git a/src/syzygy/tbprobe.cpp b/src/syzygy/tbprobe.cpp index b7ba3240..cc5e2852 100644 --- a/src/syzygy/tbprobe.cpp +++ b/src/syzygy/tbprobe.cpp @@ -199,13 +199,10 @@ public: } } - // Memory map the file and check it. File should be already open and will be - // closed after mapping. + // Memory map the file and check it. uint8_t* map(void** baseAddress, uint64_t* mapping, TBType type) { - - assert(is_open()); - - close(); // Need to re-open to get native file descriptor + if (is_open()) + close(); // Need to re-open to get native file descriptor #ifndef _WIN32 struct stat statbuf;