Compare commits

..

3 Commits

Author SHA1 Message Date
Liru Færs
31003f13af Fix Crash on text editor right click
Fixes Crashes N  and P
Missing nullcheck, my bad
Never expected there not to be a menu segment url when a menu is open
2020-01-08 10:25:44 -05:00
Router Gray
c1f39e167c Bang bang on the list baby 2020-01-07 20:00:50 -06:00
Router Gray
0e28436aa9 Fix invalid initialization of non-const reference 2020-01-07 19:59:53 -06:00
3 changed files with 3 additions and 3 deletions

View File

@@ -375,7 +375,7 @@ LLTextEditor::~LLTextEditor()
const std::string& LLTextEditor::getMenuSegmentUrl() const
{
auto segment = getSegmentAtLocalPos(mLastContextMenuX, mLastContextMenuY);
auto style = segment->getStyle();
auto style = segment ? segment->getStyle() : nullptr;
return style ? style->getLinkHREF() : LLStringUtil::null;
}

View File

@@ -545,7 +545,7 @@ void LLHoverView::updateText()
}
mText.push_back(line);
auto& objects = LLSelectMgr::getInstance()->getHoverObjects();
auto objects = LLSelectMgr::getInstance()->getHoverObjects();
line.clear();
S32 prim_count = objects->getObjectCount();

View File

@@ -9403,7 +9403,7 @@ class ListIsNearby : public view_listener_t
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
const auto&& id = LFIDBearer::getActiveSelectedID();
gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? gObjectList.findObject(id) : is_nearby(id));
gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? !!gObjectList.findObject(id) : is_nearby(id));
return true;
}
};