Fix operator bool() exception on zombie node

This commit is contained in:
Jesse Beder
2015-03-29 14:31:22 -05:00
parent 67e37d000a
commit 25b2ed0787
3 changed files with 12 additions and 4 deletions

View File

@@ -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;
}