Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added NWNX_Player_GetTurd() #1690

Merged
merged 3 commits into from
Aug 8, 2023
Merged

Added NWNX_Player_GetTurd() #1690

merged 3 commits into from
Aug 8, 2023

Conversation

Cjreek
Copy link
Contributor

@Cjreek Cjreek commented Aug 8, 2023

No description provided.

for (CExoLinkedListPosition pNode = pTURDS->pHead; pNode; pNode = pNode->pNext)
{
auto* pTURD = static_cast<CNWSPlayerTURD*>(pNode->pObject);
if (pTURD->m_oidPlayer == oidPlayer)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is nwn and all sorts of inconsistent states are possible, can you do a nullcheck for pTURD before dereferencing it? Maybe also for pTURDS?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@mtijanic mtijanic merged commit a2de6b6 into nwnxee:master Aug 8, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants