index ec43bb178b99fc6f6cefb1f935fb794d4f67fadf..33978420c61b3afa0044995bcf9ff8d62576e46f 100644 (file)
--- a/src/xml/rebase-hrefs.cpp
+++ b/src/xml/rebase-hrefs.cpp
*/
void Inkscape::XML::rebase_hrefs(SPDocument *const doc, gchar const *const new_base, bool const spns)
{
+ if (!doc->base)
+ return;
+
gchar *const old_abs_base = calc_abs_doc_base(doc->base);
gchar *const new_abs_base = calc_abs_doc_base(new_base);
@@ -224,7 +227,7 @@ void Inkscape::XML::rebase_hrefs(SPDocument *const doc, gchar const *const new_b
*
* Note also that Inkscape only supports fragment hrefs (href="#pattern257") for many of these
* cases. */
- GSList const *images = sp_document_get_resource_list(doc, "image");
+ GSList const *images = doc->get_resource_list("image");
for (GSList const *l = images; l != NULL; l = l->next) {
Inkscape::XML::Node *ir = SP_OBJECT_REPR(l->data);