diff --git a/source/simulation2/system/ParamNode.cpp b/source/simulation2/system/ParamNode.cpp index 86aa759c6f..fcd0c82775 100644 --- a/source/simulation2/system/ParamNode.cpp +++ b/source/simulation2/system/ParamNode.cpp @@ -108,9 +108,10 @@ void CParamNode::ApplyLayer(const XMBFile& xmb, const XMBElement& element, const // Split into tokens std::vector oldTokens; std::vector newTokens; - if (!replacing) // ignore the old tokens if replace="" was given + if (!replacing && !node.m_Value.empty()) // ignore the old tokens if replace="" was given boost::algorithm::split(oldTokens, node.m_Value, boost::algorithm::is_space(), boost::algorithm::token_compress_on); - boost::algorithm::split(newTokens, value, boost::algorithm::is_space(), boost::algorithm::token_compress_on); + if (!value.empty()) + boost::algorithm::split(newTokens, value, boost::algorithm::is_space(), boost::algorithm::token_compress_on); // Merge the two lists std::vector tokens = oldTokens;