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

Fix crash in vehicle display window #34175

Merged
merged 3 commits into from
Sep 22, 2019
Merged

Conversation

BevapDin
Copy link
Contributor

SUMMARY: None

Fixes #34154.

The code in veh_interact::display_details checks for the part having the "WHEEL" flag and (if it has the flag) displays the wheel date. That data is taken from the islot_wheel of the base item of the part. The code blindly assumes that all vehicle parts with the "WHEEL" flag will have base items with that item slot being set.

The new vehicle part "cart_handle" (added by #33901) has the flag, but the base item is "pipe", which does not have wheel item slot. So it crashes when that vehicle part is displayed.


I added a check in the loading code for this case.

I remove the wheel property from the mentioned vehicle part. Note that the "Grocery Cart" (which uses that part) already has another wheel.

@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` [JSON] Changes (can be) made in JSON Vehicles Vehicles, parts, mechanics & interactions labels Sep 22, 2019
@ZhilkinSerg ZhilkinSerg merged commit d3420c9 into CleverRaven:master Sep 22, 2019
@BevapDin BevapDin deleted the qch branch September 22, 2019 12:28
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` [JSON] Changes (can be) made in JSON Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error/Crash when attempting to (i)nstall on empty space
2 participants