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

return nullptr from ammo_data if ammo item is null #32316

Merged
merged 1 commit into from
Jul 12, 2019

Conversation

ymber
Copy link
Member

@ymber ymber commented Jul 11, 2019

Summary

SUMMARY: Bugfixes "Fix crash when examining empty gun with ammotype changing mod"

Purpose of change

Fixes #32298

Describe the solution

Return nullptr from item::ammo_data if the current ammo of the gun is null.

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Items: Gunmod / Toolmod Weapon and tool attachments, and add-ons labels Jul 11, 2019
@ZhilkinSerg ZhilkinSerg merged commit 437f82c into CleverRaven:master Jul 12, 2019
@ymber ymber deleted the range_fix branch July 12, 2019 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Items: Gunmod / Toolmod Weapon and tool attachments, and add-ons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

item::gun_range dereferences null pointer
2 participants