diff options
| author | bgaldrikian <[email protected]> | 2021-04-05 13:23:09 -0700 |
|---|---|---|
| committer | bgaldrikian <[email protected]> | 2021-04-05 13:23:09 -0700 |
| commit | 3648d8e3af3154b4df1c68397d07a297bc6bc43a (patch) | |
| tree | fc1f89b41a84c738c3db9405821a1c9d8c58dede /sdk | |
| parent | Merge pull request #20 from riturajjain2000/master (diff) | |
| download | blast-3648d8e3af3154b4df1c68397d07a297bc6bc43a.tar.xz blast-3648d8e3af3154b4df1c68397d07a297bc6bc43a.zip | |
Fixing exception in TkGroupImpl.cpp
Diffstat (limited to 'sdk')
| -rwxr-xr-x | sdk/toolkit/source/NvBlastTkGroupImpl.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sdk/toolkit/source/NvBlastTkGroupImpl.cpp b/sdk/toolkit/source/NvBlastTkGroupImpl.cpp index 19f9747..60ed352 100755 --- a/sdk/toolkit/source/NvBlastTkGroupImpl.cpp +++ b/sdk/toolkit/source/NvBlastTkGroupImpl.cpp @@ -296,9 +296,12 @@ bool TkGroupImpl::removeActor(TkActor& actor) 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;
+ if (index < m_jobs.size())
+ {
+ 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;
+ }
}
}
|