-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix for issue #35067 #35102
Fix for issue #35067 #35102
Conversation
An assert was being thrown while attempting to render information for non-gun weapons in the UI. This was caused by attempting to render ammunition information incorrectly for items that did not contain the ammunition structure. Adding a check for is_gun() before rendering is necessary to prevent the crash.
You need to astyle your changes. |
In the future, please make a branch for your changes before submitting them. Having them in |
Fixes #30676 |
So this was treating the symptom but not the cause. Items with the |
@karthas077 I just saw your comment regarding this breakage introduced by #34735. I was a little puzzled at the time regarding the interaction between these islots. Do you know whether this underlying issue has since been solved? |
@jbytheway To my knowledge the current feature duplication between those fields is still present, but I went on vacation for almost all of November and am just getting back so I could have missed something. |
An assert was being thrown while attempting to render information for non-gun weapons in the UI. This was caused by attempting to render ammunition information incorrectly for items that did not contain the ammunition structure. Adding a check for is_gun() before rendering is necessary to prevent the crash.
Summary
SUMMARY: Bugfixes "Game Crash when scrolling over combat knife"
Purpose of change
Fixes #35102
An assert was being thrown while attempting to render information for non-gun weapons in the UI. This was caused by attempting to render ammunition information incorrectly for items that did not contain the ammunition structure. Adding a check for is_gun() before rendering is necessary to prevent the crash.
Describe the solution
Added a check to the rendering code to prevent it trying read and render the missing data.
Testing
Ascertained the location of the error by recreating the bug with the original code, added the check and re-tested. Also checked to make sure that other item types were not incorrectly affected by the change