mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
wpiutil: uv: Don't close uninitialized handles (#1372)
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
using namespace wpi::uv;
|
||||
|
||||
Handle::~Handle() noexcept {
|
||||
if (!m_closed) {
|
||||
if (!m_closed && m_uv_handle->type != UV_UNKNOWN_HANDLE) {
|
||||
uv_close(m_uv_handle, [](uv_handle_t* uv_handle) { delete uv_handle; });
|
||||
} else {
|
||||
delete m_uv_handle;
|
||||
|
||||
Reference in New Issue
Block a user