Skip to content

Commit

Permalink
Protect the MythUIType destructor to prevent it being called incorrec…
Browse files Browse the repository at this point in the history
…tly. Refs #10807

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
  • Loading branch information
Lawrence Rust authored and stuartm committed Jun 6, 2012
1 parent c9497cb commit 36364d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/subtitlescreen.cpp
Expand Up @@ -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
}
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/mythuitype.h
Expand Up @@ -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);

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 36364d1

Please sign in to comment.