diff --git a/AK/Function.h b/AK/Function.h index 85ee9de9b1..06e3f3a75d 100644 --- a/AK/Function.h +++ b/AK/Function.h @@ -205,6 +205,7 @@ private: template void init_with_callable(Callable&& callable) { + VERIFY(m_call_nesting_level == 0); using WrapperType = CallableWrapper; if constexpr (sizeof(WrapperType) > inline_capacity) { *bit_cast(&m_storage) = new WrapperType(move(callable));