Permalink
Browse files

Fix leak in TeletextScreen::ClearScreen. Fixes 10630

  • Loading branch information...
stuartm committed Apr 20, 2012
1 parent d86999d commit d5b6760f1cf3a6eb031c96a7b340fbcbd1bb2358
Showing with 6 additions and 2 deletions.
  1. +6 −2 mythtv/libs/libmythtv/teletextscreen.cpp
@@ -65,8 +65,12 @@ bool TeletextScreen::Create(void)
void TeletextScreen::ClearScreen(void)
{
DeleteAllChildren();
- for (int i = 0; i < m_rowImages.size(); i++)
- delete m_rowImages.value(i);
+ QHash<int, QImage*>::iterator it = m_rowImages.begin();
+ for (; it != m_rowImages.end(); ++it)
+ {
+ if (*it)
+ delete (*it);
+ }
m_rowImages.clear();
SetRedraw();
}

0 comments on commit d5b6760

Please sign in to comment.