diff --git a/Kernel/KResult.h b/Kernel/KResult.h index 8c7da0e0791..b6988f13646 100644 --- a/Kernel/KResult.h +++ b/Kernel/KResult.h @@ -111,6 +111,8 @@ public: KResultOr& operator=(KResultOr&& other) { + if (&other == this) + return *this; if (!m_is_error && m_have_storage) { value().~T(); m_have_storage = false;