diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-07-30 09:07:36 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-07-30 09:07:36 +0300 |
commit | 6de3a7f91dc5d508834a8cf1e399a21be948fe43 (patch) | |
tree | 41d59c2af9170eff57e96758f3bf7843e07a1c9f /indra/newview | |
parent | 573c23488fb0b47b5041f56084fcd2a43b7913c6 (diff) |
SL-15729 Crash calling childSetEnabled
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0c05d30a86..6daf99156c 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -360,11 +360,14 @@ LLMenuParcelObserver::~LLMenuParcelObserver() void LLMenuParcelObserver::changed() { LLParcel *parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(); - gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID()== gAgent.getID())); - - BOOL buyable = enable_buy_land(NULL); - gMenuHolder->childSetEnabled("Land Buy", buyable); - gMenuHolder->childSetEnabled("Buy Land...", buyable); + if (gMenuHolder && parcel) + { + gMenuHolder->childSetEnabled("Land Buy Pass", LLPanelLandGeneral::enableBuyPass(NULL) && !(parcel->getOwnerID() == gAgent.getID())); + + BOOL buyable = enable_buy_land(NULL); + gMenuHolder->childSetEnabled("Land Buy", buyable); + gMenuHolder->childSetEnabled("Buy Land...", buyable); + } } |