diff --git a/src/sp-style-elem.cpp b/src/sp-style-elem.cpp
index 63a9bae38abdb413d8811fddc74dd7f25d403731..fa756242cab2dc53ba362d438b608dcd509241c0 100644 (file)
--- a/src/sp-style-elem.cpp
+++ b/src/sp-style-elem.cpp
// that uses a style from it. It just forces the parent of <style> to reread its style as soon as the stylesheet
// is fully loaded. Naturally, this won't work if the user of the stylesheet is its grandparent or precedent.
SPObject *parent = SP_OBJECT_PARENT (object);
- sp_style_read_from_object(parent->style, parent);
+ if ( parent ) {
+ sp_style_read_from_object(parent->style, parent);
+ }
}
/**