diff --git a/AK/NonnullRefPtr.h b/AK/NonnullRefPtr.h index 75272f71c8..2a6d9b1d29 100644 --- a/AK/NonnullRefPtr.h +++ b/AK/NonnullRefPtr.h @@ -102,7 +102,7 @@ public: template NonnullRefPtr& operator=(const NonnullRefPtr& other) { - if (m_ptr != other.m_ptr) { + if (m_ptr != other.ptr()) { deref_if_not_null(m_ptr); m_ptr = const_cast(static_cast(other.ptr())); m_ptr->ref();