aboutsummaryrefslogtreecommitdiff
path: root/operating-system-experiment/Mutex.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-06-11 11:02:41 +0800
committercrupest <crupest@outlook.com>2021-06-11 11:02:41 +0800
commit49da23fa1637e8fd2f94dd83e612082baeb140f1 (patch)
treed7ef7be491a559976a31a7611f01d997c0df7696 /operating-system-experiment/Mutex.cpp
parent864c09033f17904640fc17e571a50ab64f8f225d (diff)
downloadlife-49da23fa1637e8fd2f94dd83e612082baeb140f1.tar.gz
life-49da23fa1637e8fd2f94dd83e612082baeb140f1.tar.bz2
life-49da23fa1637e8fd2f94dd83e612082baeb140f1.zip
...
Diffstat (limited to 'operating-system-experiment/Mutex.cpp')
-rw-r--r--operating-system-experiment/Mutex.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/operating-system-experiment/Mutex.cpp b/operating-system-experiment/Mutex.cpp
index 4d360f1..8acfdc5 100644
--- a/operating-system-experiment/Mutex.cpp
+++ b/operating-system-experiment/Mutex.cpp
@@ -86,6 +86,7 @@ void Mutex::Destroy() {
if (handle_ != nullptr) {
auto c = CloseHandle(handle_);
assert(c);
+ handle_ = nullptr;
}
#else
if (mutex_ != nullptr) {