From a7bc8781a9bf8f3f2b3b204da66b2f991d11a4ec Mon Sep 17 00:00:00 2001 From: Jupeyy Date: Wed, 18 May 2022 18:23:02 +0200 Subject: [PATCH] Put assert for text containers after printing all non empty text containers --- src/engine/client/text.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/engine/client/text.cpp b/src/engine/client/text.cpp index 9ecbf96f6..7d866e1b0 100644 --- a/src/engine/client/text.cpp +++ b/src/engine/client/text.cpp @@ -1904,15 +1904,18 @@ public: void OnWindowResize() override { + bool HasNonEmptyTextContainer = false; for(auto *pTextContainer : m_TextContainers) { if(pTextContainer->m_StringInfo.m_QuadBufferContainerIndex != -1) { - dbg_msg("textrender", "Found non empty text container with index %d", pTextContainer->m_StringInfo.m_QuadBufferContainerIndex); - dbg_assert(false, "text container was not empty"); + dbg_msg("textrender", "Found non empty text container with index %d with %d quads", pTextContainer->m_StringInfo.m_QuadBufferContainerIndex, (int)pTextContainer->m_StringInfo.m_QuadNum); + HasNonEmptyTextContainer = true; } } + dbg_assert(!HasNonEmptyTextContainer, "text container was not empty"); + for(auto &pFont : m_Fonts) { // reset the skylines