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

Prevent dangling pointers when removing obj from map. Closes #531, closes #538 #626

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

JanSimek
Copy link
Contributor

@JanSimek JanSimek commented May 3, 2020

To reproduce the crash simply load the artemple map and open the inventory.

Use aliasing constructor until we unravel the mix of raw and smart pointers.

@adamkewley I do not have much experience with smart pointers but this seems like the easiest fix for now

@adamkewley
Copy link
Contributor

@JanSimek seems like a sane use of the aliasing ctor for now (I have learnt something myself: I've never used this). But yeah, I'm guessing the long-term plan is to make the various methods take smart pointers / references in future to reduce these kinds of lifetime issues.

@667bdrm
Copy link
Contributor

667bdrm commented Jul 22, 2020

I confirm this fixes crash when accessing shelves container at desrt11.map

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.

None yet

3 participants