summaryrefslogtreecommitdiffstats
path: root/src/io/resource-manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/io/resource-manager.cpp')
-rw-r--r--src/io/resource-manager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/io/resource-manager.cpp b/src/io/resource-manager.cpp
index fc742cb80..308aca8a9 100644
--- a/src/io/resource-manager.cpp
+++ b/src/io/resource-manager.cpp
@@ -338,7 +338,12 @@ bool ResourceManagerImpl::fixupBrokenLinks(SPDocument *doc)
}
}
- std::map<Glib::ustring, Glib::ustring> mapping = locateLinks(doc->getDocumentBase(), brokenHrefs);
+ Glib::ustring base;
+ if (doc->getDocumentBase()) {
+ base = doc->getDocumentBase();
+ }
+
+ std::map<Glib::ustring, Glib::ustring> mapping = locateLinks(base, brokenHrefs);
for ( std::map<Glib::ustring, Glib::ustring>::iterator it = mapping.begin(); it != mapping.end(); ++it )
{
// TODO debug g_message(" [%s] ==> {%s}", it->first.c_str(), it->second.c_str());