destroy updater state machine if login instance destroyed.
parent
b89b41991e
commit
7887bdfd5c
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue