Skip to content

Commit c298be0

Browse files
authored
task_self_deleting bugfix in copy assignment operator (#305)
It was comparing to `nullptr` not `this`, oops.
1 parent eef5815 commit c298be0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/detail/task_self_deleting.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ promise_self_deleting::promise_self_deleting(promise_self_deleting&& other)
2020

2121
auto promise_self_deleting::operator=(promise_self_deleting&& other) -> promise_self_deleting&
2222
{
23-
if (std::addressof(other) != nullptr)
23+
if (std::addressof(other) != this)
2424
{
2525
m_executor_size = std::exchange(other.m_executor_size, nullptr);
2626
}

0 commit comments

Comments
 (0)