Fix crash caused by queuing multiple pick up orders for a single unit.#21425
Merged
PunkPun merged 1 commit intoOpenRA:bleedfrom May 27, 2024
Merged
Fix crash caused by queuing multiple pick up orders for a single unit.#21425PunkPun merged 1 commit intoOpenRA:bleedfrom
PunkPun merged 1 commit intoOpenRA:bleedfrom
Conversation
c42308c to
2e68ced
Compare
PunkPun
reviewed
May 26, 2024
Member
PunkPun
left a comment
There was a problem hiding this comment.
It crashes with null exception because it failed to reserve in OnFirstRun and now it doesn't have child activities. To fix this we should make sure we cancel the activity on failing to reserve. I recon a flag should be good as we can't call Cancel in OnFirstTick
2e68ced to
f7db9d5
Compare
Contributor
Author
Aha, something like this (see updated code)? That also fixes it. |
PunkPun
reviewed
May 26, 2024
f7db9d5 to
5230c2b
Compare
PunkPun
approved these changes
May 27, 2024
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feel free to suggest a simpler check, or a better location for it.
If you queue multiple pick up orders on a single unit, the game will crash once the Carryall has picked up the unit and has fully taken off again (as it tries to perform another PickupUnit activity).
This fixes it.