summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrew A. de Laix <alain@lindenlab.com>2010-11-08 16:10:54 -0800
committerAndrew A. de Laix <alain@lindenlab.com>2010-11-08 16:10:54 -0800
commitd681ea89d27e0e37d77c7f57c9bc66fda3f08f4e (patch)
treebc96a24b2b49b8253ce42f7163846b48992a7784 /indra
parent1a711b3fd5912776424012fcfcb472baf6c195af (diff)
Get rid of intrusive_ptr member to prevent crash on shutdown.
Diffstat (limited to 'indra')
-rw-r--r--indra/viewer_components/updater/llupdatechecker.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/viewer_components/updater/llupdatechecker.cpp b/indra/viewer_components/updater/llupdatechecker.cpp
index d31244cc9b..c6aa9b0f11 100644
--- a/indra/viewer_components/updater/llupdatechecker.cpp
+++ b/indra/viewer_components/updater/llupdatechecker.cpp
@@ -70,7 +70,6 @@ private:
Client & mClient;
LLHTTPClient mHttpClient;
bool mInProgress;
- LLHTTPClient::ResponderPtr mMe;
std::string mVersion;
std::string buildUrl(std::string const & protocolVersion, std::string const & hostUrl,
@@ -109,8 +108,7 @@ const char * LLUpdateChecker::Implementation::sProtocolVersion = "v1.0";
LLUpdateChecker::Implementation::Implementation(LLUpdateChecker::Client & client):
mClient(client),
- mInProgress(false),
- mMe(this)
+ mInProgress(false)
{
; // No op.
}
@@ -118,7 +116,7 @@ LLUpdateChecker::Implementation::Implementation(LLUpdateChecker::Client & client
LLUpdateChecker::Implementation::~Implementation()
{
- mMe.reset(0);
+ ; // No op.
}
@@ -136,9 +134,11 @@ void LLUpdateChecker::Implementation::check(std::string const & protocolVersion,
// The HTTP client will wrap a raw pointer in a boost::intrusive_ptr causing the
// passed object to be silently and automatically deleted. We pass a self-
- // referential intrusive pointer stored as an attribute of this class to keep
- // the client from deletig the update checker implementation instance.
- mHttpClient.get(checkUrl, mMe);
+ // referential intrusive pointer to which we add a reference to keep the
+ // client from deleting the update checker implementation instance.
+ LLHTTPClient::ResponderPtr temporaryPtr(this);
+ boost::intrusive_ptr_add_ref(temporaryPtr.get());
+ mHttpClient.get(checkUrl, temporaryPtr);
}
void LLUpdateChecker::Implementation::completed(U32 status,