mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
chan: fix thread-unsafe access of WeakPointerTo
This commit is contained in:
parent
eda47c7f3b
commit
269d154aea
@ -154,10 +154,11 @@ apply_transform(const TransformState *transform) {
|
||||
|
||||
AppliedTransforms::iterator ati = _applied_transforms.find(transform);
|
||||
if (ati != _applied_transforms.end()) {
|
||||
if ((*ati).first.is_valid_pointer() &&
|
||||
(*ati).second.is_valid_pointer()) {
|
||||
// Here's our cached result.
|
||||
return (*ati).second.lock();
|
||||
if ((*ati).first.is_valid_pointer()) {
|
||||
if (auto new_bundle = (*ati).second.lock()) {
|
||||
// Here's our cached result.
|
||||
return new_bundle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user