diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/document.cpp | 2 | ||||
| -rw-r--r-- | src/uri-references.cpp | 13 |
2 files changed, 13 insertions, 2 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; diff --git a/src/uri-references.cpp b/src/uri-references.cpp index abe16ec9d..de293716b 100644 --- a/src/uri-references.cpp +++ b/src/uri-references.cpp @@ -58,7 +58,7 @@ void URIReference::attach(const URI &uri) throw(BadURIException) // The path contains references to seperate document files to load. if(document && uri.getPath()) { - std::string base = std::string(document->getBase()); + std::string base = std::string(document->getBase() ? document->getBase() : ""); std::string path = uri.getFullPath(base); if(!path.empty()) document = document->createChildDoc(path); @@ -184,3 +184,14 @@ sp_uri_reference_resolve (SPDocument *document, const gchar *uri) return ref; } + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : |
