summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrew A. de Laix <alain@lindenlab.com>2010-12-10 11:03:34 -0800
committerAndrew A. de Laix <alain@lindenlab.com>2010-12-10 11:03:34 -0800
commit7887bdfd5c5488f49e48df1eae67ab30faabb1da (patch)
treeb4ea20a4b0d6c4148cefe1f0c0eed9edc04f8005 /indra
parentb89b41991e49e24b826d1b44ebfe3587a8b248ab (diff)
destroy updater state machine if login instance destroyed.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lllogininstance.cpp10
-rw-r--r--indra/newview/lllogininstance.h5
2 files changed, 13 insertions, 2 deletions
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 <boost/scoped_ptr.hpp>
#include <sstream>
+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<LLLoginInstance>
{
public:
+ class Disposable;
+
LLLoginInstance();
~LLLoginInstance();
@@ -106,7 +108,8 @@ private:
int mLastExecEvent;
UpdaterLauncherCallback mUpdaterLauncher;
LLEventDispatcher mDispatcher;
- LLUpdaterService * mUpdaterService;
+ LLUpdaterService * mUpdaterService;
+ boost::scoped_ptr<Disposable> mUpdateStateMachine;
};
#endif