From 036920c7262dfaf1532f3ba77a013b7ec04d5f7c Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Thu, 4 Jun 2020 22:07:13 +0200 Subject: Fix crash on Windows srv_thread_pool->disable_aio() followed by os_file_close() causes crash, even though it should be OK. --- tpool/tpool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpool/tpool.h b/tpool/tpool.h index ae9baf236b0..239be53c27e 100644 --- a/tpool/tpool.h +++ b/tpool/tpool.h @@ -229,7 +229,7 @@ public: m_aio.reset(); } int bind(native_file_handle &fd) { return m_aio->bind(fd); } - void unbind(const native_file_handle &fd) { m_aio->unbind(fd); } + void unbind(const native_file_handle &fd) { if (m_aio) m_aio->unbind(fd); } int submit_io(aiocb *cb) { return m_aio->submit_io(cb); } virtual void wait_begin() {}; virtual void wait_end() {}; -- cgit v1.2.1