From b315d797e12d93f34858a72b2d0d2dfa3afa3a4e Mon Sep 17 00:00:00 2001 From: Lawrence Rust Date: Sun, 3 Jun 2012 12:23:12 +0200 Subject: [PATCH] libmyth: Prevent a SEGV in mythwelcome when backend connection reestablished Mythwelcome can suffer a SEGV if it receives a CONNECTION_RESTABLISHED MythEvent which races with a user close event. Signed-off-by: Lawrence Rust Signed-off-by: Stuart Morgan --- mythtv/libs/libmyth/mythcontext.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/mythtv/libs/libmyth/mythcontext.cpp b/mythtv/libs/libmyth/mythcontext.cpp index 7384a54bce9..305ed92da43 100644 --- a/mythtv/libs/libmyth/mythcontext.cpp +++ b/mythtv/libs/libmyth/mythcontext.cpp @@ -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; @@ -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)