diff options
author | Paul Guslisty <pguslisty@productengine.com> | 2010-04-29 15:02:05 +0300 |
---|---|---|
committer | Paul Guslisty <pguslisty@productengine.com> | 2010-04-29 15:02:05 +0300 |
commit | 6838fd3698355e2bcfea4150c8a91f205742102d (patch) | |
tree | 1ce2116a53c1ded7416e43612c195db36c7f40dd /indra/newview/llinventoryobserver.cpp | |
parent | 4eb741883cbee15e28272677bcb9b58dce85ee42 (diff) |
Fixed normal bug EXT-5377 (Viewer crashes if \"My Appearance\" tab has been pressed in offline mode)
- Added checking for a null pointer
Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/329/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llinventoryobserver.cpp')
-rw-r--r-- | indra/newview/llinventoryobserver.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 214b5d317a..e4a7b17966 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -215,7 +215,7 @@ void LLInventoryFetchItemsObserver::changed(U32 mask) void fetch_items_from_llsd(const LLSD& items_llsd) { - if (!items_llsd.size()) return; + if (!items_llsd.size() || gDisconnected) return; LLSD body; body[0]["cap_name"] = "FetchInventory"; body[1]["cap_name"] = "FetchLib"; @@ -235,6 +235,11 @@ void fetch_items_from_llsd(const LLSD& items_llsd) for (S32 i=0; i<body.size(); i++) { + if(!gAgent.getRegion()) + { + llwarns<<"Agent's region is null"<<llendl; + break; + } if (0 >= body[i].size()) continue; std::string url = gAgent.getRegion()->getCapability(body[i]["cap_name"].asString()); |