Permalink
Browse files

Fix incorrect deletion of a MythUIType object in MythUIButtonList::Co…

…pyFrom() which left an invalid pointer in the list of children. Refs #10807

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
  • Loading branch information...
Lawrence Rust authored and stuartm committed Jun 6, 2012
1 parent 67ef67b commit c9497cb775f3dd77829bf426bbdff61074ee8819
Showing with 1 addition and 3 deletions.
  1. +1 −3 mythtv/libs/libmythui/mythuibuttonlist.cpp
@@ -2780,10 +2780,8 @@ void MythUIButtonList::CopyFrom(MythUIType *base)
for (int i = 0; i < (int)m_itemsVisible; i++)
{
- MythUIType *deltype;
QString name = QString("buttonlist button %1").arg(i);
- deltype = GetChild(name);
- delete deltype;
+ DeleteChild(name);
}
m_ButtonList.clear();

0 comments on commit c9497cb

Please sign in to comment.