mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 04:51:17 +00:00
Fix operator bool() exception on zombie node
This commit is contained in:
@@ -60,8 +60,9 @@ inline void Node::EnsureNodeExists() const {
|
||||
}
|
||||
|
||||
inline bool Node::IsDefined() const {
|
||||
if (!m_isValid)
|
||||
throw InvalidNode();
|
||||
if (!m_isValid) {
|
||||
return false;
|
||||
}
|
||||
return m_pNode ? m_pNode->is_defined() : true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user