From e140f4bd523fafb4416296987a59bd06d5e88de4 Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Thu, 10 Mar 2022 16:51:03 +0900 Subject: [PATCH] Fix coverity issue on dli loader : Add null check Add some null checker branch on dli-loader which can be nullptr Change-Id: I716b21f041a712bc66a31471c1fd9ae966ecc6b3 Signed-off-by: Eunki, Hong --- dali-scene-loader/public-api/dli-loader.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dali-scene-loader/public-api/dli-loader.cpp b/dali-scene-loader/public-api/dli-loader.cpp index 18214dd..48a82c3 100644 --- a/dali-scene-loader/public-api/dli-loader.cpp +++ b/dali-scene-loader/public-api/dli-loader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1626,14 +1626,13 @@ void DliLoader::Impl::ParseAnimations(const TreeNode* tnAnimations, LoadParams& if(tnValue) { animProp.mValue.reset(new AnimatedProperty::Value{ReadPropertyValue(*tnValue)}); + ReadBool(tnProperty.GetChild("relative"), animProp.mValue->mIsRelative); } else { mOnError(FormatString("Property '%s' fails to define target value.", animProp.mPropertyName.c_str())); } - - ReadBool(tnProperty.GetChild("relative"), animProp.mValue->mIsRelative); } animDef.mProperties.push_back(std::move(animProp)); -- 2.7.4