From: blevin Date: Sat, 3 Feb 2024 04:04:03 +0000 (-0800) Subject: Fix crashes when UsdRenderProduct's orderedVars points at X-Git-Tag: accepted/tizen/unified/x/20250428.070456~5^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c33e4c266e0cf0319080feeaf255b492901adb2;p=platform%2Fcore%2Fuifw%2FOpenUSD.git Fix crashes when UsdRenderProduct's orderedVars points at a target prim that does not exist. (Internal change: 2314341) --- diff --git a/pxr/usd/usdRender/spec.cpp b/pxr/usd/usdRender/spec.cpp index ced5de505..b75d1a013 100644 --- a/pxr/usd/usdRender/spec.cpp +++ b/pxr/usd/usdRender/spec.cpp @@ -238,7 +238,7 @@ UsdRenderComputeSpec( } if (!foundExisting) { UsdPrim prim = stage->GetPrimAtPath(renderVarPath); - if (prim.IsA()) { + if (prim && prim.IsA()) { UsdRenderVar rvPrim(prim); UsdRenderSpec::RenderVar rvSpec; diff --git a/pxr/usdImaging/usdImaging/renderSettingsAdapter.cpp b/pxr/usdImaging/usdImaging/renderSettingsAdapter.cpp index 6d7f1e747..0d60f2ba5 100644 --- a/pxr/usdImaging/usdImaging/renderSettingsAdapter.cpp +++ b/pxr/usdImaging/usdImaging/renderSettingsAdapter.cpp @@ -156,7 +156,7 @@ UsdImagingRenderSettingsAdapter::Populate( &renderVarPaths); for (SdfPath const& renderVarPath: renderVarPaths ) { UsdPrim rv = prim.GetStage()->GetPrimAtPath(renderVarPath); - if (rv.IsA()) { + if (rv && rv.IsA()) { index->AddDependency(/* to */rsPrimPath, /* from */rv); }