Menu

#1486 check pointer

Undefined
wont-fix
nobody
None
Bug_Report
2024-06-26
2024-06-25
No

File: \src\plugins\codecompletion\parser\parserthread.cpp line 844
Code:
Token* foundNsToken = nullptr;
wxStringTokenizer tokenizer(m_Str, ParserConsts::dcolon);
while (tokenizer.HasMoreTokens())
{
std::queue<wxstring> nsQuqe;
nsQuqe.push(tokenizer.GetNextToken());
foundNsToken = FindTokenFromQueue(nsQuqe, foundNsToken, true, foundNsToken);
foundNsToken->m_TokenKind = tkNamespace;
}
m_UsedNamespacesIds.insert(foundNsToken->m_Index); // <-- better check pointer</wxstring>

Discussion

  • Miguel Gimenez

    Miguel Gimenez - 2024-06-26
    • status: open --> wont-fix
     
  • Miguel Gimenez

    Miguel Gimenez - 2024-06-26

    m_Str is never empty here, so the while() is executed at least once.

     

Log in to post a comment.

MongoDB Logo MongoDB