diff options
Diffstat (limited to 'src/uri-references.cpp')
| -rw-r--r-- | src/uri-references.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/uri-references.cpp b/src/uri-references.cpp index dc0101024..abe16ec9d 100644 --- a/src/uri-references.cpp +++ b/src/uri-references.cpp @@ -58,10 +58,12 @@ 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(g_strdup(document->getBase())); + std::string base = std::string(document->getBase()); std::string path = uri.getFullPath(base); if(!path.empty()) document = document->createChildDoc(path); + else + document = NULL; } if(!document) { g_warning("Can't get document for referenced URI: %s", uri.toString()); |
