Permalink
Browse files

Protect the MythUIType destructor to prevent it being called incorrec…

…tly. Refs #10807

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
  • Loading branch information...
1 parent c9497cb commit 36364d1ef37a1478e495d1d79154609e851de242 Lawrence Rust committed with stuartm Jun 6, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 mythtv/libs/libmythtv/subtitlescreen.cpp
  2. +1 −1 mythtv/libs/libmythui/mythuitype.h
View
2 mythtv/libs/libmythtv/subtitlescreen.cpp
@@ -167,7 +167,7 @@ SubtitleFormat::~SubtitleFormat(void)
for (int i = 0; i < m_cleanup.size(); ++i)
{
m_cleanup[i]->DeleteAllChildren();
- delete m_cleanup[i];
+ m_cleanup[i]->deleteLater();
m_cleanup[i] = NULL; // just to be safe
}
}
View
2 mythtv/libs/libmythui/mythuitype.h
@@ -67,7 +67,6 @@ class MUI_PUBLIC MythUIType : public QObject, public XMLParseBase
public:
MythUIType(QObject *parent, const QString &name);
- virtual ~MythUIType();
virtual void Reset(void);
@@ -174,6 +173,7 @@ class MUI_PUBLIC MythUIType : public QObject, public XMLParseBase
QMap<QString, QString> GetDependsMap() const { return m_dependsMap; }
protected:
+ virtual ~MythUIType();
virtual void customEvent(QEvent *);
public slots:

0 comments on commit 36364d1

Please sign in to comment.