From 0e7075927156e2a4868991feeee86f0c84a0e96c Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 8 Jan 2022 19:35:43 +0100 Subject: [PATCH] AK: Unbreak ref counting hooks in RefCounted Same fix as 5871072ed3f7b7f4c2492828e1ad7fe167cd16bd, but for userspace this time. Regressed in c4a0f01b02d84117e644f2aff4396bdac1bcf40d. --- AK/RefCounted.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/RefCounted.h b/AK/RefCounted.h index 7b45070342..95f7183083 100644 --- a/AK/RefCounted.h +++ b/AK/RefCounted.h @@ -61,7 +61,7 @@ class RefCounted : public RefCountedBase { public: bool unref() const { - auto const* that = static_cast(this); + auto* that = const_cast(static_cast(this)); auto new_ref_count = deref_base(); if (new_ref_count == 0) {