summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2024-08-27 17:35:24 +0300
committerGitHub <noreply@github.com>2024-08-27 17:35:24 +0300
commitc225b44a59ddd6b84105ace4181b3ca9f7439bfa (patch)
treee79d4f065c1d47ce9e9bbd2f2f20d089c7c9027c /indra/newview/llinventorymodel.cpp
parent3919e85f89d2d95af3bd4b824293d6eda6a80162 (diff)
parent27ce2a23a286709c90579db31c2551e0c3f292e7 (diff)
Merge pull request #2384 from secondlife/lua-inventory
Lua inventory api
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r--indra/newview/llinventorymodel.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 5325c28abf..c98c3482d0 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1289,6 +1289,10 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
S32 count = cat_array->size();
for(S32 i = 0; i < count; ++i)
{
+ if (add.exceedsLimit())
+ {
+ break;
+ }
LLViewerInventoryCategory* cat = cat_array->at(i);
if(add(cat,NULL))
{
@@ -1307,6 +1311,10 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
S32 count = item_array->size();
for(S32 i = 0; i < count; ++i)
{
+ if (add.exceedsLimit())
+ {
+ break;
+ }
item = item_array->at(i);
if(add(NULL, item))
{