summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/document.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/document.cpp b/src/document.cpp
index 6f957cace..470d0cc5a 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -473,7 +473,7 @@ SPDocument *SPDocument::createChildDoc(std::string const &uri)
SPDocument *parent = this;
SPDocument *document = NULL;
- while(parent != NULL && document == NULL) {
+ while(parent != NULL && parent->getURI() != NULL && document == NULL) {
// Check myself and any parents int he chain
if(uri == parent->getURI()) {
document = parent;