Make visualPickResult used by Pointers a private copy

This commit is contained in:
sabrina-shanman 2018-09-24 17:15:56 -07:00
parent d768809fbc
commit 7f189e4d10

View file

@ -68,7 +68,7 @@ void Pointer::update(unsigned int pointerID) {
// This only needs to be a read lock because update won't change any of the properties that can be modified from scripts
withReadLock([&] {
auto pickResult = getPrevPickResult();
auto visualPickResult = getVisualPickResult(pickResult);
auto visualPickResult = getVisualPickResult(std::make_shared<PickResult>(*pickResult.get()));
updateVisuals(visualPickResult);
generatePointerEvents(pointerID, visualPickResult);
});