From fa6f601170e007298f03981e82a6d86d568bccf4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 21 Jul 2019 11:36:22 +0200 Subject: [PATCH] AK: RefPtr::operator=(RefPtr&&) needs to cast the incoming pointer. Otherwise it's not possible to assign a RefPtr&& to a RefPtr. --- AK/RefPtr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/RefPtr.h b/AK/RefPtr.h index 99ebca89b9..91e08be088 100644 --- a/AK/RefPtr.h +++ b/AK/RefPtr.h @@ -108,7 +108,7 @@ public: { if (this != static_cast(&other)) { deref_if_not_null(m_ptr); - m_ptr = other.leak_ref(); + m_ptr = static_cast(other.leak_ref()); } return *this; }