diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-04-07 19:38:27 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-04-07 21:13:48 +0300 |
commit | 1df890d75cdf3f97854b372a92f6c7acfb8ef18d (patch) | |
tree | 5a1329bb212d6527bb3c5206529401e2a3304fdb /indra | |
parent | a7a8d6c02e781188ad93280490be495dab5296ab (diff) |
#3627 std::bad_alloc in EventPoll
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lleventpoll.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index c05a7fef44..c6fea1ba82 100644 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -101,10 +101,18 @@ namespace Details void LLEventPollImpl::handleMessage(const LLSD& content) { LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; - std::string msg_name = content["message"]; + std::string msg_name = content["message"].asString(); LLSD message; - message["sender"] = mSenderIp; - message["body"] = content["body"]; + try + { + message["sender"] = mSenderIp; + message["body"] = content["body"]; + } + catch (std::bad_alloc&) + { + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS("LLCoros") << "Bad memory allocation on message: " << msg_name << LL_ENDL; + } LLMessageSystem::dispatch(msg_name, message); } |