mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
AK: Fix NonnullRefPtr<T>::operator=(NonnullRefPtr<U>).
This commit is contained in:
parent
d6cd98cfa1
commit
fc9a1a1328
Notes:
sideshowbarker
2024-07-19 13:03:06 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/fc9a1a13287
1 changed files with 1 additions and 1 deletions
|
@ -102,7 +102,7 @@ public:
|
|||
template<typename U>
|
||||
NonnullRefPtr& operator=(const NonnullRefPtr<U>& other)
|
||||
{
|
||||
if (m_ptr != other.m_ptr) {
|
||||
if (m_ptr != other.ptr()) {
|
||||
deref_if_not_null(m_ptr);
|
||||
m_ptr = const_cast<T*>(static_cast<const T*>(other.ptr()));
|
||||
m_ptr->ref();
|
||||
|
|
Loading…
Add table
Reference in a new issue