aws / lumberyard

Amazon Lumberyard is a free AAA game engine deeply integrated with AWS and Twitch – with full source.
Other
2.04k stars 541 forks source link

Avoid dangling pointer in variant reflection. #425

Open yuriy0 opened 5 years ago

yuriy0 commented 5 years ago

The callback will sometimes store the pointer to the class element (fourth arg), e.g. InstanceDataHierarchy::Build

Issue #, if available:

Description of changes: Title says it all. Current code takes a pointer to a temporary variable which is stored and later accessed after it is no longer valid.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

sconel commented 5 years ago

Hi @yuriy0, thanks for contributing to LY we'll take a look at the change.