X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fsvgtiny.c;h=165fc215758f330d32beb0dc8dda704fd9e234c0;hb=864636d1ee1bfabe716d46697b097d577ba226f8;hp=91ce4396799e7f96714fdb7e4114a6e23f2fa600;hpb=2337ca93eb0bbd19a8a02645b3bd0d4bc8a0f684;p=libsvgtiny.git diff --git a/src/svgtiny.c b/src/svgtiny.c index 91ce439..165fc21 100644 --- a/src/svgtiny.c +++ b/src/svgtiny.c @@ -2340,30 +2340,6 @@ css_select_results *svgtiny_parse_styles(dom_element *node, dom_string_unref(attr); } - struct dom_element *parent; - dom_element_parent_node(node, &parent); - if (parent == NULL) { - /* This is the root node, skip it. - * - * While initialising its selection state, libcss sets its - * node_data->bloom pointer using css__get_parent_bloom(). - * But if there is no parent, that function returns, - * - * static css_bloom empty_bloom[CSS_BLOOM_SIZE]; - * - * A problem later arises because when libcss FINALISES its - * selection state, it frees node_data->bloom! That obviously - * won't work then node has no parent, i.e. if it's the root - * element. - */ - css_stylesheet_destroy(inline_sheet); - return NULL; - } - else { - /* We only needed to know if it was NULL */ - dom_node_unref(parent); - } - code = svgtiny_select_style(state, node, inline_sheet, &styles); css_stylesheet_destroy(inline_sheet); if (code != CSS_OK) {