From: Richard Huang Date: Wed, 2 Oct 2024 11:46:18 +0000 (+0100) Subject: Fix the crash in usd-loader automated test X-Git-Tag: dali_2.3.44~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F83%2F318583%2F1;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Fix the crash in usd-loader automated test Change-Id: Iedaccf0416035553caeff9282de8db37cb692997 --- diff --git a/dali-usd-loader/internal/usd-loader-impl.cpp b/dali-usd-loader/internal/usd-loader-impl.cpp index 1645ffc..fbbdc39 100644 --- a/dali-usd-loader/internal/usd-loader-impl.cpp +++ b/dali-usd-loader/internal/usd-loader-impl.cpp @@ -472,6 +472,11 @@ bool UsdLoaderImpl::LoadModel(const std::string& url, Dali::Scene3D::Loader::Loa { // Open the stage of the USD scene from the specified URL mImpl->mUsdStage = UsdStage::Open(url); + if(!mImpl->mUsdStage) + { + DALI_LOG_ERROR("Failed to open %s\n", url.c_str()); + return false; + } mImpl->mMeshCount = 0; mImpl->mNodeIndex = INVALID_INDEX;