1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 08:57:34 +00:00

AK: Unbreak ref counting hooks in RefCounted

Same fix as 5871072ed3, but for userspace
this time. Regressed in c4a0f01b02.
This commit is contained in:
Andreas Kling 2022-01-08 19:35:43 +01:00
parent 01823746e3
commit 0e70759271

View file

@ -61,7 +61,7 @@ class RefCounted : public RefCountedBase {
public: public:
bool unref() const bool unref() const
{ {
auto const* that = static_cast<T const*>(this); auto* that = const_cast<T*>(static_cast<T const*>(this));
auto new_ref_count = deref_base(); auto new_ref_count = deref_base();
if (new_ref_count == 0) { if (new_ref_count == 0) {