Remove ASSERT() that can fail in Graphics::doUIStringAlgorithm()

This commit is contained in:
David Capello 2019-04-12 16:03:24 -03:00
parent 7f21deb4d5
commit 43d6867f98

View File

@ -481,10 +481,11 @@ gfx::Size Graphics::doUIStringAlgorithm(const std::string& str, gfx::Color fg, g
newBeg = end+1;
}
ASSERT(beg < end);
// Get the entire line to be painted
line = str.substr(beg, end-beg);
if (end != std::string::npos)
line = str.substr(beg, end-beg);
else
line.clear();
gfx::Size lineSize(
m_font->textLength(line.c_str()),