[ImageEngine/cortex] 97c19f: USD VolumeAlgo : Fix crash loading empty field

0 views
Skip to first unread message

Eric Mehl

unread,
Sep 18, 2024, 9:37:29 AM9/18/24
to cortex...@googlegroups.com
Branch: refs/heads/RB-10.5
Home: https://github.com/ImageEngine/cortex
Commit: 97c19f0bf21204902c2151502b22d8f0580906c9
https://github.com/ImageEngine/cortex/commit/97c19f0bf21204902c2151502b22d8f0580906c9
Author: John Haddon <thehad...@gmail.com>
Date: 2024-09-18 (Wed, 18 Sep 2024)

Changed paths:
M Changes
M contrib/IECoreUSD/src/IECoreUSD/VolumeAlgo.cpp
M contrib/IECoreUSD/test/IECoreUSD/USDSceneTest.py
A contrib/IECoreUSD/test/IECoreUSD/data/volumeWithEmptyField.usda

Log Message:
-----------
USD VolumeAlgo : Fix crash loading empty field

If an attribute has no value, `DataAlgo::fromUSD()` returns `nullptr`, and we were dereferencing it. We could probably still use a `static_cast` here as long as we checked for null, since we don't expect anything but StringData when non-null. But since I failed to predict this outcome, I've gone belt-and-braces and used a `runTimeCast()`.


Commit: 065d63d7f81c1250024beba548cf9f777915c208
https://github.com/ImageEngine/cortex/commit/065d63d7f81c1250024beba548cf9f777915c208
Author: Eric Mehl <er...@thinkhypothetical.com>
Date: 2024-09-18 (Wed, 18 Sep 2024)

Changed paths:
M Changes
M contrib/IECoreUSD/src/IECoreUSD/VolumeAlgo.cpp
M contrib/IECoreUSD/test/IECoreUSD/USDSceneTest.py
A contrib/IECoreUSD/test/IECoreUSD/data/volumeWithEmptyField.usda

Log Message:
-----------
Merge pull request #1435 from johnhaddon/usdVolumeFix

USD VolumeAlgo : Fix crash loading empty field


Compare: https://github.com/ImageEngine/cortex/compare/ac8275369b1c...065d63d7f81c

To unsubscribe from these emails, change your notification settings at https://github.com/ImageEngine/cortex/settings/notifications
Reply all
Reply to author
Forward
0 new messages