summaryrefslogtreecommitdiff
path: root/indra/llcommon/workqueue.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2026-01-20 03:56:38 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2026-01-20 03:56:38 +0200
commit30e7621140a3cbf4c911f596c1325f4b7eae25a6 (patch)
treec91ced079bd5b84eb5cd3c7a9c3b3b7bb8367057 /indra/llcommon/workqueue.cpp
parent7d616292ad664472ffa79cc0cd447096a18e72ba (diff)
parent8bacd29bcb36b87ca237fe3ff9459461c1a4cf55 (diff)
Merge branch 'develop-linux' into project/lua_editor
# Conflicts: # indra/newview/llpreviewscript.cpp
Diffstat (limited to 'indra/llcommon/workqueue.cpp')
-rw-r--r--indra/llcommon/workqueue.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/llcommon/workqueue.cpp b/indra/llcommon/workqueue.cpp
index 7efaebd569..4db44ff2a6 100644
--- a/indra/llcommon/workqueue.cpp
+++ b/indra/llcommon/workqueue.cpp
@@ -276,12 +276,30 @@ bool LL::WorkQueue::done()
bool LL::WorkQueue::post(const Work& callable)
{
- return mQueue.pushIfOpen(callable);
+ try
+ {
+ return mQueue.pushIfOpen(callable);
+ }
+ catch (std::bad_alloc&)
+ {
+ LLError::LLUserWarningMsg::showOutOfMemory();
+ LL_ERRS("LLCoros") << "Bad memory allocation in WorkQueue::post" << LL_ENDL;
+ return false;
+ }
}
bool LL::WorkQueue::tryPost(const Work& callable)
{
- return mQueue.tryPush(callable);
+ try
+ {
+ return mQueue.tryPush(callable);
+ }
+ catch (std::bad_alloc&)
+ {
+ LLError::LLUserWarningMsg::showOutOfMemory();
+ LL_ERRS("LLCoros") << "Bad memory allocation in WorkQueue::tryPost" << LL_ENDL;
+ return false;
+ }
}
LL::WorkQueue::Work LL::WorkQueue::pop_()