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

SelectionInfo.Index out of bounds when entities are added/removed #30

Open
allsey87 opened this issue Dec 27, 2016 · 0 comments
Open

SelectionInfo.Index out of bounds when entities are added/removed #30

allsey87 opened this issue Dec 27, 2016 · 0 comments
Assignees
Labels

Comments

@allsey87
Copy link
Collaborator

On line 207 of qtopengl_widget.cpp, there is an assumption that vecEntities has not changed and that SelectionInfo.Index is always valid over the collection. This does not always hold, and SelectionInfo.Index can be out of range if, for instance, entities are removed from CSpace::m_vecRootEntities during a CLoopFunctions::Reset

One quick fix could be to check if the size of the vector has changed between calls to DrawScene? Or perhaps CSpace could contain a flag indicating that m_vecRootEntities has changed and visualizations can consequently drop any selection info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants