From 7887bdfd5c5488f49e48df1eae67ab30faabb1da Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Fri, 10 Dec 2010 11:03:34 -0800 Subject: destroy updater state machine if login instance destroyed. --- indra/newview/lllogininstance.cpp | 10 +++++++++- indra/newview/lllogininstance.h | 5 ++++- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 1858cbdcd9..8d9d7298f8 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -64,8 +64,15 @@ #include #include +class LLLoginInstance::Disposable { +public: + virtual ~Disposable() {} +}; + namespace { - class MandatoryUpdateMachine { + class MandatoryUpdateMachine: + public LLLoginInstance::Disposable + { public: MandatoryUpdateMachine(LLLoginInstance & loginInstance, LLUpdaterService & updaterService); @@ -754,6 +761,7 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg) { gViewerWindow->setShowProgress(false); MandatoryUpdateMachine * machine = new MandatoryUpdateMachine(*this, *mUpdaterService); + mUpdateStateMachine.reset(machine); machine->start(); return; } diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h index cb1f56a971..b872d7d1b1 100644 --- a/indra/newview/lllogininstance.h +++ b/indra/newview/lllogininstance.h @@ -41,6 +41,8 @@ class LLUpdaterService; class LLLoginInstance : public LLSingleton { public: + class Disposable; + LLLoginInstance(); ~LLLoginInstance(); @@ -106,7 +108,8 @@ private: int mLastExecEvent; UpdaterLauncherCallback mUpdaterLauncher; LLEventDispatcher mDispatcher; - LLUpdaterService * mUpdaterService; + LLUpdaterService * mUpdaterService; + boost::scoped_ptr mUpdateStateMachine; }; #endif -- cgit v1.2.3