From 1602477dfd4371a17639b0b6e4f59f5a5ea9565a Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Fri, 15 Mar 2019 15:21:30 +0100 Subject: Make InkscapeApplication responsible for managing documents and windows. Any change from previous behavior is a bug. --- src/io/resource-manager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/io/resource-manager.cpp') 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 mapping = locateLinks(doc->getDocumentBase(), brokenHrefs); + Glib::ustring base; + if (doc->getDocumentBase()) { + base = doc->getDocumentBase(); + } + + std::map mapping = locateLinks(base, brokenHrefs); for ( std::map::iterator it = mapping.begin(); it != mapping.end(); ++it ) { // TODO debug g_message(" [%s] ==> {%s}", it->first.c_str(), it->second.c_str()); -- cgit v1.2.3