vcpkg/ports/cocoyaxi/fix-event-destruct.patch
Alvin 20f876042b
[co] Rename port co to cocoyaxi (#22442)
* rename port co to cocoyaxi

* update version

* update port version

* update sha

* rename co to cocoyaxi

* update sha

* cleanup portfile for cocoyaxi

* update sha

* add co

* update version for co

* fix version files

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2022-01-20 14:15:22 -08:00

14 lines
398 B
Diff

diff --git a/src/co/co.cc b/src/co/co.cc
index 8921296..838ac16 100644
--- a/src/co/co.cc
+++ b/src/co/co.cc
@@ -8,7 +8,7 @@ namespace co {
class EventImpl {
public:
EventImpl() : _counter(0), _signaled(false), _has_cond(false) {}
- ~EventImpl() { co::xx::cond_destroy(&_cond); }
+ ~EventImpl() { if (_has_cond) co::xx::cond_destroy(&_cond); }
bool wait(uint32 ms);