Files
test2/source
Jesse Yurkovich eac1ade956 Fix #132077: Prevent stack-use-after-return inside USD_create_handle
Commit 0df5d8220b made a change to have the `USDStageReader` only keep
a reference to the ImportSettings struct. This isn't safe to do because
there's scenarios where the ImportSettings might be defined as a stack
variable but the reader outlives the lifetime of that variable. This
happens inside `USD_create_handle` where the reader is returned to the
caller for instance.

Fix this, and the original issue which lead to the change causing the
regression, by having `USDStageReader` own ImportSettings directly so
it's more obvious that it is A) tied to the lifetime of the reader and
B) can no longer become out of sync with a caller's own ImportSettings
data (since that no longer exists).

Pull Request: https://projects.blender.org/blender/blender/pulls/132095
2024-12-22 21:35:12 +01:00
..