aboutsummaryrefslogtreecommitdiff
path: root/sdk
diff options
context:
space:
mode:
authorBryan Galdrikian <[email protected]>2021-03-16 08:23:01 -0700
committerGitHub <[email protected]>2021-03-16 08:23:01 -0700
commitd7f11c36d9331e816782a60631ecc26a9a43fad1 (patch)
tree5e8b1057e02954d8003ebff9fa97e4c1f403a842 /sdk
parentMerge pull request #18 from lgzy/fix-asset-joint-serialization (diff)
parentFix index being out of bounds (diff)
downloadblast-d7f11c36d9331e816782a60631ecc26a9a43fad1.tar.xz
blast-d7f11c36d9331e816782a60631ecc26a9a43fad1.zip
Merge pull request #19 from lgzy/fix-index-out-of-bounds
Fix index out of bounds
Diffstat (limited to 'sdk')
-rwxr-xr-xsdk/toolkit/source/NvBlastTkGroupImpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sdk/toolkit/source/NvBlastTkGroupImpl.cpp b/sdk/toolkit/source/NvBlastTkGroupImpl.cpp
index c3cbd5e..19f9747 100755
--- a/sdk/toolkit/source/NvBlastTkGroupImpl.cpp
+++ b/sdk/toolkit/source/NvBlastTkGroupImpl.cpp
@@ -293,9 +293,9 @@ bool TkGroupImpl::removeActor(TkActor& actor)
{
uint32_t index = tkActor.m_groupJobIndex;
tkActor.m_groupJobIndex = invalidIndex<uint32_t>();
- m_jobs.replaceWithLast(index);
if (index < m_jobs.size())
{
+ m_jobs.replaceWithLast(index);
NVBLAST_ASSERT(m_jobs[index].m_tkActor->m_groupJobIndex == m_jobs.size());
NVBLAST_ASSERT(m_jobs[index].m_tkActor->isPending());
m_jobs[index].m_tkActor->m_groupJobIndex = index;