Filter out unparsable layers
[synfig.git] / synfig-core / src / modules / mod_svg / svg_parser.cpp
index ea36efa..d062ab5 100644 (file)
@@ -217,6 +217,7 @@ void
 Svg_parser::parser_graphics(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent){
        if(const xmlpp::Element* nodeElement = dynamic_cast<const xmlpp::Element*>(node)){
                Glib::ustring nodename = node->get_name();
+               if (nodename.compare("g")==0 || nodename.compare("path")==0 || nodename.compare("polygon")==0 || nodename.compare("rect")==0){} else return;
 
                //load sub-attributes
                Glib::ustring id                        =nodeElement->get_attribute_value("id");