Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USD VolumeAlgo : Fix crash loading empty field #1435

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

johnhaddon
Copy link
Member

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().

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()`.
@ericmehl
Copy link
Collaborator

Good catch! LGTM

@ericmehl ericmehl merged commit 065d63d into ImageEngine:RB-10.5 Sep 18, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants