Skip to content

Commit

Permalink
Merge pull request #87 from anders007/master
Browse files Browse the repository at this point in the history
bool vector operator [] crash
  • Loading branch information
jonygli authored Aug 14, 2019
2 parents 70dde05 + ff2c059 commit a280fe2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inc/behaviac/agent/agent.h
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,11 @@ namespace behaviac {
void set(bool v) {
behaviac::THREAD_ID_TYPE threadId = behaviac::GetTID();
bool* value = m_threadInt.find((long)threadId);
if (!value)
{
m_threadInt.add((long)threadId, v);
return;
}
BEHAVIAC_ASSERT(value);
*value = v;
}
Expand Down

0 comments on commit a280fe2

Please sign in to comment.