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 insert item segfault #79556

Merged
merged 1 commit into from
Feb 6, 2025
Merged

Conversation

marilynias
Copy link
Contributor

@marilynias marilynias commented Feb 6, 2025

Summary

Bugfixes "fix segfault when trying to insert items into container not carried"

Purpose of change

In #79518 I forgot to check if there even is a carrier in the first place, leading to a segfault.
fix #79548

Describe the solution

carrier != nullptr before carrier->is_avatar()

Describe alternatives you've considered

Make a default implementation for similar to item_location::nowhere, character::noone, which would touch alot more code since the it seems to be standard to check if Character == nullptr

Testing

can insert item from issue.

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Feb 6, 2025
@marilynias marilynias marked this pull request as draft February 6, 2025 12:51
@marilynias marilynias marked this pull request as ready for review February 6, 2025 12:51
@github-actions github-actions bot added <Bugfix> This is a fix for a bug (or closes open issue) BasicBuildPassed This PR builds correctly, label assigned by github actions labels Feb 6, 2025
@Maleclypse Maleclypse merged commit 4091893 into CleverRaven:master Feb 6, 2025
41 of 48 checks passed
@marilynias marilynias deleted the fix-insert branch February 7, 2025 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segfault inserting antiseptic into bottle of antiseptic
2 participants