From 9cac5c71ee5bb7c65b61ff2a838f0c5108df3182 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Tue, 11 Mar 2008 11:35:03 -0700 Subject: [PATCH] check all errors. --- src/core/object.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/object.cc b/src/core/object.cc index 6186e2813..e1d442760 100644 --- a/src/core/object.cc +++ b/src/core/object.cc @@ -750,8 +750,12 @@ bool AttributeList::SetFailSafe (std::string name, Attribute value) { struct TypeId::AttributeInfo info; - TypeId::LookupAttributeByFullName (name, &info); - bool ok = DoSet (&info, value); + bool ok = TypeId::LookupAttributeByFullName (name, &info); + if (!ok) + { + return false; + } + ok = DoSet (&info, value); return ok; } void