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 when removing a post-process stage. #7213

Merged
merged 2 commits into from
Oct 31, 2018
Merged

Conversation

bagnell
Copy link
Contributor

@bagnell bagnell commented Oct 31, 2018

Fixes #7210.

@cesium-concierge
Copy link

Thanks for the pull request @bagnell!

  • ✔️ Signed CLA found.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

Sorry, something went wrong.

@@ -294,6 +294,9 @@ define([
var stages = arraySlice(this._stages);
while (stages.length > 0) {
var stage = stages.pop();
if (!defined(stage)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it expected that a stage in this list would be undefined? Just want to make sure this isn't a deeper issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. See this line in remove: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/PostProcessStageCollection.js#L402

They are set to undefined and removed on the next update.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok.

@lilleyse
Copy link
Contributor

This fixes the issue. Thanks @bagnell.

@lilleyse lilleyse merged commit eaa3d75 into master Oct 31, 2018
@lilleyse lilleyse deleted the fix-post-process-crash branch October 31, 2018 21:05
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