Skip to content

Commit

Permalink
libmyth: Prevent a SEGV in mythwelcome when backend connection reesta…
Browse files Browse the repository at this point in the history
…blished

Mythwelcome can suffer a SEGV if it receives a CONNECTION_RESTABLISHED
MythEvent which races with a user close event.

Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
  • Loading branch information
Lawrence Rust authored and stuartm committed Nov 23, 2012
1 parent 9f99277 commit b315d79
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions mythtv/libs/libmyth/mythcontext.cpp
Expand Up @@ -86,10 +86,8 @@ class MythContextPrivate : public QObject

void ShowConnectionFailurePopup(bool persistent);
void HideConnectionFailurePopup(void);
void ConnectFailurePopupClosed(void);

void ShowVersionMismatchPopup(uint remoteVersion);
void VersionMismatchPopupClosed(void);

public:
MythContext *parent;
Expand Down Expand Up @@ -1016,11 +1014,10 @@ void MythContextPrivate::ShowConnectionFailurePopup(bool persistent)

void MythContextPrivate::HideConnectionFailurePopup(void)
{
if (MBEconnectPopup)
{
MBEconnectPopup->Close();
MBEconnectPopup = NULL;
}
MythConfirmationDialog *dlg = this->MBEconnectPopup;
this->MBEconnectPopup = NULL;
if (dlg)
dlg->Close();
}

void MythContextPrivate::ShowVersionMismatchPopup(uint remote_version)
Expand Down

0 comments on commit b315d79

Please sign in to comment.