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

raidboss: Eliminiate a race condition during raidboss initialization. #672

Merged
merged 1 commit into from
Oct 17, 2019

Conversation

ngld
Copy link
Contributor

@ngld ngld commented Oct 16, 2019

If we attach the overlay listeners before gPopupText has been set, we risk triggering a "Cannot read property '...' of undefined" error. If we attach them in the constructor instead, we can be sure that the object exists.
Since only one instance of PopupText is ever created, we don't have to worry about detaching the overlay listeners.

This should fix the issue reported in #660 (comment).

I've also eliminated a duplicated call to cactbotReadDataFiles which was part of the modified code.

If we attach the overlay listeners before gPopupText has been set,
we risk triggering a "Cannot read property '...' of undefined"
error. If we attach them in the constructor instead, we can be sure
that the object exists.
Since only one instance of PopupText is ever created, we don't have
to worry about detaching the overlay listeners.

This should fix the issue reported in
quisquous#660 (comment)
@quisquous quisquous merged commit d1991a5 into quisquous:ngldoverlay Oct 17, 2019
@quisquous
Copy link
Owner

Thanks!

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.

2 participants