summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-02-12 15:01:18 +0000
committerKurt Zenker <kz@openoffice.org>2009-02-12 15:01:18 +0000
commite9fbb304f600248e87c465fd43cac58e4192f21e (patch)
tree6f8f34bf5f31a4584bd37afca2ab7b8f0b0f3afd
parent62ad516f2c0fbd786a9eaa72587a780b9ac3993e (diff)
CWS-TOOLING: integrate CWS sb105_OOO310
2009-02-02 15:33:54 +0100 sb r267272 : #i98602# childNode apparently can legitimately be null in handle(ValueNode const &); this was asserted---but otherwise handled gracefully---before r262819
-rw-r--r--configmgr/source/tree/updatehelper.cxx54
1 files changed, 27 insertions, 27 deletions
diff --git a/configmgr/source/tree/updatehelper.cxx b/configmgr/source/tree/updatehelper.cxx
index 3cc8112314..17a60be4e2 100644
--- a/configmgr/source/tree/updatehelper.cxx
+++ b/configmgr/source/tree/updatehelper.cxx
@@ -450,36 +450,36 @@ void ApplyUpdate::handle(RemoveNode& _rChange)
virtual void handle(ValueNode const& _aNewNode)
{
sharable::Node * childNode = m_cacheNode->getSubnode(getNodeName(_aNewNode));
-
- OSL_ENSURE(childNode != 0, "TreeDifferenceBuilder: could not find expected node !");
-
- sharable::ValueNode * valueNode = childNode->valueData();
-
- OSL_ENSURE(valueNode != 0, "TreeDifferenceBuilder: node must be a value node!");
-
- // if the values differ add a new change
- if (_aNewNode.getValue() != valueNode->getValue())
+ if (childNode != 0)
{
- bool bNewDefault = _aNewNode.isDefault();
- bool bOldDefault = valueNode->info.isDefault();
-
- ValueChange::Mode eMode;
- if (bNewDefault)
- if (bOldDefault)
- eMode = ValueChange::changeDefault;
+ sharable::ValueNode * valueNode = childNode->valueData();
+
+ OSL_ENSURE(valueNode != 0, "TreeDifferenceBuilder: node must be a value node!");
+
+ // if the values differ add a new change
+ if (_aNewNode.getValue() != valueNode->getValue())
+ {
+ bool bNewDefault = _aNewNode.isDefault();
+ bool bOldDefault = valueNode->info.isDefault();
+
+ ValueChange::Mode eMode;
+ if (bNewDefault)
+ if (bOldDefault)
+ eMode = ValueChange::changeDefault;
+ else
+ eMode = ValueChange::setToDefault;
else
- eMode = ValueChange::setToDefault;
- else
- if (bOldDefault)
- eMode = ValueChange::wasDefault;
- else
- eMode = ValueChange::changeValue;
+ if (bOldDefault)
+ eMode = ValueChange::wasDefault;
+ else
+ eMode = ValueChange::changeValue;
- std::auto_ptr<Change> pChange(
- new ValueChange(_aNewNode.getName(), _aNewNode.getAttributes(), eMode,
- _aNewNode.getValue(), valueNode->getValue()) );
-
- m_rChangeList.addChange(pChange);
+ std::auto_ptr<Change> pChange(
+ new ValueChange(_aNewNode.getName(), _aNewNode.getAttributes(), eMode,
+ _aNewNode.getValue(), valueNode->getValue()) );
+
+ m_rChangeList.addChange(pChange);
+ }
}
}
virtual void handle(ISubtree const& _aNewNode)