Skip to content

Commit

Permalink
Merge pull request #1232 from marktucker/dev_safe_usdimaging_get
Browse files Browse the repository at this point in the history
Add some defensive coding when calling UsdImagingDelegate::Get

(Internal change: 2076194)
  • Loading branch information
pixar-oss committed Jun 15, 2020
2 parents a5c3a4f + c942104 commit f433d0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pxr/usdImaging/usdImaging/delegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2327,8 +2327,8 @@ UsdImagingDelegate::Get(SdfPath const& id, TfToken const& key)
// XXX(UsdImaging): We use cachePath directly as usdPath here,
// but should do the proper transformation. Maybe we can use
// the primInfo.usdPrim?
TF_VERIFY(_GetUsdPrim(cachePath).GetAttribute(key)
.Get(&value, _time),
UsdPrim prim = _GetUsdPrim(cachePath);
TF_VERIFY(prim && prim.GetAttribute(key).Get(&value, _time),
"%s, %s\n", id.GetText(), key.GetText());
}
}
Expand Down

0 comments on commit f433d0b

Please sign in to comment.