summaryrefslogtreecommitdiffstats
path: root/src/xml/simple-node.cpp
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2008-06-08 20:42:25 +0000
committermental <mental@users.sourceforge.net>2008-06-08 20:42:25 +0000
commit4ab15362ef6bfffc2dfa2106f936eb6b48b19c68 (patch)
treec7599d8db79e43efe22edbf83afe15c6ffc5a805 /src/xml/simple-node.cpp
parentplumb document references a little deeper in (diff)
downloadinkscape-4ab15362ef6bfffc2dfa2106f936eb6b48b19c68.tar.gz
inkscape-4ab15362ef6bfffc2dfa2106f936eb6b48b19c68.zip
force single single document over a node's lifetime
(bzr r5862)
Diffstat (limited to '')
-rw-r--r--src/xml/simple-node.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xml/simple-node.cpp b/src/xml/simple-node.cpp
index 8ddc5b167..d4a412ae6 100644
--- a/src/xml/simple-node.cpp
+++ b/src/xml/simple-node.cpp
@@ -164,6 +164,8 @@ SimpleNode::SimpleNode(int code, Document *document)
: Node(), _name(code), _attributes(), _child_count(0),
_cached_positions_valid(false)
{
+ g_assert(document != NULL);
+
this->_document = document;
this->_parent = this->_next = NULL;
this->_first_child = this->_last_child = NULL;
@@ -178,6 +180,8 @@ SimpleNode::SimpleNode(SimpleNode const &node, Document *document)
_child_count(node._child_count),
_cached_positions_valid(node._cached_positions_valid)
{
+ g_assert(document != NULL);
+
_document = document;
_parent = _next = NULL;
_first_child = _last_child = NULL;