# HG changeset patch # User Santeri Piippo # Date 1382109414 -10800 # Node ID adab82ab13a55f1ec84a1474521aee96bd53dc3d # Parent c3787dbd6315a667a7addba580fe5c2804116dab fixed: LDForge would crash if message log got full - the older lines would be removed with ::erase, which now expects an iterator because of the recent transition to QList. Why does QList::iterator allow 0 to be passed? diff -r c3787dbd6315 -r adab82ab13a5 src/gldraw.cpp --- a/src/gldraw.cpp Fri Oct 18 18:12:23 2013 +0300 +++ b/src/gldraw.cpp Fri Oct 18 18:16:54 2013 +0300 @@ -1791,12 +1791,12 @@ // Check the top and bottom rows for (int i = 0; i < w && !filled; ++i) - if (imgdata[i] != white || imgdata[ ( (h - 1) * w) + i] != white) + if (imgdata[i] != white || imgdata[((h - 1) * w) + i] != white) filled = true; // Left and right edges for (int i = 0; i < h && !filled; ++i) - if (imgdata[i * w] != white || imgdata[ (i * w) + (w - 1)] != white) + if (imgdata[i * w] != white || imgdata[(i * w) + w - 1] != white) filled = true; delete[] cap; diff -r c3787dbd6315 -r adab82ab13a5 src/messagelog.cpp --- a/src/messagelog.cpp Fri Oct 18 18:12:23 2013 +0300 +++ b/src/messagelog.cpp Fri Oct 18 18:16:54 2013 +0300 @@ -74,7 +74,7 @@ void MessageManager::addLine (str line) { // If there's too many entries, pop the excess out while (m_lines.size() >= g_maxMessages) - m_lines.erase (0); + m_lines.removeFirst(); m_lines << Line (line);