AnimalLogic / AL_USDMaya

This repo is no longer updated. Please see https://github.com/Autodesk/maya-usd
Other
266 stars 69 forks source link

fix TranslatorContext::updatePrimTypes crash when removing non-existent prims #73

Closed alekamca closed 6 years ago

alekamca commented 6 years ago

Description (this won't be part of the changelog)

When updatePrimTypes was removing prims from the m_primMapping (should it even do that?), it wasn't using std::vector::erase correctly. As a result, it was trying to dereference invalid iterators, causing occasional crashes.

It should be noted that this only occurs if for some reason your m_primMapping has entries for prims that do not exist in the stage. When removed via a variant switch (or other tracked mechanism), the m_primMapping will be correctly updated before the updatePrimTypes call.

Changelog

These entries will be used to update the changelog.

Use Markdown list syntax for each entry.

Filled out fields will be added to the changelog.

Fixed

[TranslatorContext] minor bug where removing previously tracked prims might cause the internal PrimLookup to become out of sync (and possibly crash).

Checklist (Please do not remove this line)