index 8d771fef2d597c8eb4a4a722135abe01ed07ce9a..33978420c61b3afa0044995bcf9ff8d62576e46f 100644 (file)
--- a/src/xml/rebase-hrefs.cpp
+++ b/src/xml/rebase-hrefs.cpp
*
* \param spns True iff doc should contain sodipodi:absref attributes.
*/
-void Inkscape::XML::rebase_hrefs(Document *const doc, gchar const *const new_base, bool const spns)
+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(Document *const doc, gchar const *const new_bas
*
* 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);