Skip to content

Commit

Permalink
Merge pull request #2230 from Autodesk/krickw/MAYA-122502/sometimes_t…
Browse files Browse the repository at this point in the history
…here_are_no_colors

MAYA-122502 When instance colors is nullptr don't get the length.
  • Loading branch information
seando-adsk authored Mar 31, 2022
2 parents 132c056 + 7c693e8 commit 7ee36d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mayaUsd/render/vp2RenderDelegate/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2518,7 +2518,7 @@ void HdVP2Mesh::_UpdateDrawItem(
TF_VERIFY(result == MStatus::kSuccess);
}

if (stateToCommit._instanceColors->length() > 0) {
if (stateToCommit._instanceColors && stateToCommit._instanceColors->length() > 0) {
TF_VERIFY(
newInstanceCount * kNumColorChannels
== stateToCommit._instanceColors->length());
Expand Down

0 comments on commit 7ee36d7

Please sign in to comment.