Skip to content

Commit 7e33159

Browse files
Ensure we don't register the TfNotice callback twice MAXTOA-1824 (#2089)
* Ensure we don't register the TfNotice callback twice MAXTOA-1824 * Update changelog * Fix changelog
1 parent 9e9b8d0 commit 7e33159

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# Changelog
33

44
## Pending next bugfix release
5+
- [usd#2090](https://github.com/Autodesk/arnold-usd/issues/2090) - Fixed crashes when registering the TfNotice callback multiple times
6+
7+
## [7.3.4.0] - 2024-08-30
58
- [usd#2075](https://github.com/Autodesk/arnold-usd/issues/2075) - Ensure options attributes are not set while a hydra render is in progress
69

710
## [7.3.3.1] - 2024-08-09

libs/translator/reader/reader.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,9 +568,12 @@ void UsdArnoldReader::ReadStage(UsdStageRefPtr stage, const std::string &path)
568568
// to be informed of the interactive changes happening in the UsdStage
569569
// (which must be kept in memory)
570570
if (_interactive) {
571-
_objectsChangedNoticeKey =
572-
TfNotice::Register(TfCreateWeakPtr(&_listener),
571+
// only register the callback if it wasn't already done
572+
if (!_objectsChangedNoticeKey.IsValid()) {
573+
_objectsChangedNoticeKey =
574+
TfNotice::Register(TfCreateWeakPtr(&_listener),
573575
&StageListener::_OnUsdObjectsChanged, _stage);
576+
}
574577
// The eventual "root path" is needed, since we want to ignore changes
575578
// that aren't part of it
576579
_listener._rootPath = _hasRootPrim ? _rootPrim.GetPath() : SdfPath();

0 commit comments

Comments
 (0)