diff options
author | brad kittenbrink <brad@lindenlab.com> | 2009-07-07 18:09:45 -0700 |
---|---|---|
committer | brad kittenbrink <brad@lindenlab.com> | 2009-07-07 18:09:45 -0700 |
commit | 1f9a6f3bdcadb11aea5083e3066ef5e870e69f8a (patch) | |
tree | ac0b07a75d6ee0ae63d2d9f35b721aa20d619b57 | |
parent | abcc37e4ca6e8a4020f4d53e9692fe8a856ca306 (diff) |
Fix for crash when quitting due to mAppViewer being NULL.
-rw-r--r-- | indra/newview/llappviewer.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llappviewerlistener.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llappviewerlistener.h | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index bed63c4dbc..b14853777d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -188,7 +188,7 @@ // define a self-registering event API object #include "llappviewerlistener.h" -static LLAppViewerListener sAppViewerListener("LLAppViewer", LLAppViewer::instance()); +static LLAppViewerListener sAppViewerListener("LLAppViewer", NULL); ////// Windows-specific includes to the bottom - nasty defines in these pollute the preprocessor // diff --git a/indra/newview/llappviewerlistener.cpp b/indra/newview/llappviewerlistener.cpp index a8c98b17a7..a3af251a3c 100644 --- a/indra/newview/llappviewerlistener.cpp +++ b/indra/newview/llappviewerlistener.cpp @@ -27,7 +27,11 @@ LLAppViewerListener::LLAppViewerListener(const std::string& pumpname, LLAppViewe add("requestQuit", &LLAppViewerListener::requestQuit); } -void LLAppViewerListener::requestQuit(const LLSD& event) const +void LLAppViewerListener::requestQuit(const LLSD& event) { + if(mAppViewer == NULL) + { + mAppViewer = LLAppViewer::instance(); + } mAppViewer->requestQuit(); } diff --git a/indra/newview/llappviewerlistener.h b/indra/newview/llappviewerlistener.h index ab17dd1d90..d702f605ef 100644 --- a/indra/newview/llappviewerlistener.h +++ b/indra/newview/llappviewerlistener.h @@ -26,7 +26,7 @@ public: LLAppViewerListener(const std::string& pumpname, LLAppViewer* llappviewer); private: - void requestQuit(const LLSD& event) const; + void requestQuit(const LLSD& event); LLAppViewer* mAppViewer; }; |