From 79531a0378edc6510fbda606b26bd235ae48ced3 Mon Sep 17 00:00:00 2001 From: Wonki Kim Date: Wed, 18 Mar 2020 14:07:19 +0900 Subject: [PATCH] bootstrap: fix a potentional null-dereferencing this patch fixes a potentional null-deref error Change-Id: I0132cdab6410ea10ebb7b00e00306e8a1d5806b6 --- bootstrap/server/src/Commands/SetValueCommand.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bootstrap/server/src/Commands/SetValueCommand.cc b/bootstrap/server/src/Commands/SetValueCommand.cc index eeb5a54..1aa59de 100644 --- a/bootstrap/server/src/Commands/SetValueCommand.cc +++ b/bootstrap/server/src/Commands/SetValueCommand.cc @@ -12,8 +12,7 @@ SetValueCommand::SetValueCommand(const ::aurum::ReqSetValue* request, LOG_SCOPE_F(INFO, "SetValue --------------- "); ObjectMapper* mObjMap = ObjectMapper::getInstance(); UiObject* obj = mObjMap->getElement(mRequest->elementid()); - obj->setText(const_cast(mRequest->stringvalue())); + if (obj) obj->setText(const_cast(mRequest->stringvalue())); LOG_F(INFO, "%p %s", obj, mRequest->stringvalue().c_str()); - return grpc::Status::OK; } \ No newline at end of file -- 2.7.4