AK: Assert non-empty Utf32View, when initialized with non-zero length

This was useful in debugging a nullptr dereference, which was happening
through later, but was caused by this inconsistent initialization.
This commit is contained in:
Kevin Meyer 2020-06-13 00:04:17 +02:00 committed by Andreas Kling
parent 49cd03be95
commit e0f4fdc9b4
Notes: sideshowbarker 2024-07-19 05:38:11 +09:00

View file

@ -39,6 +39,7 @@ public:
: m_codepoints(codepoints)
, m_length(length)
{
ASSERT(codepoints || length == 0);
}
const u32* codepoints() const { return m_codepoints; }