From fc9a1a13287a477c1873d05ff72bad3163555999 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 26 Jul 2019 08:04:33 +0200 Subject: [PATCH] AK: Fix NonnullRefPtr::operator=(NonnullRefPtr). --- AK/NonnullRefPtr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();