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 debug message and crash in debug mapgen preview #36342

Merged
merged 1 commit into from
Dec 22, 2019

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented Dec 22, 2019

Summary

SUMMARY: None

Purpose of change

When scrolling through the overmap terrain list in the mapgen preview mode, a debug message "submap already exists" shows and the game crashes after ignoring the message. This fixes the crash.

Describe the solution

Reset submap pointers to nullptr after deleting the submaps in editmap::cleartmpmap, so the mapgen code doesn't think the submaps still exist.

Testing

No crash occurs after the fix.

@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` labels Dec 22, 2019
@ZhilkinSerg ZhilkinSerg merged commit fdee8ef into CleverRaven:master Dec 22, 2019
@Qrox Qrox deleted the fix-debug-mapgen-error branch December 23, 2019 07:38
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`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants