diff --git a/src/rapidxml_loader.cpp b/src/rapidxml_loader.cpp index a11064f3e..016068fa2 100644 --- a/src/rapidxml_loader.cpp +++ b/src/rapidxml_loader.cpp @@ -141,7 +141,10 @@ private: case rapidxml::node_data: case rapidxml::node_cdata: { - node.add_child(cur_node->value(), 0, true); + if (cur_node->value_size() > 0) // Don't add empty text nodes + { + node.add_child(cur_node->value(), 0, true); + } } break; default: diff --git a/tests/data/good_maps/empty_text_symbolizer.xml b/tests/data/good_maps/empty_text_symbolizer.xml new file mode 100644 index 000000000..1582583ee --- /dev/null +++ b/tests/data/good_maps/empty_text_symbolizer.xml @@ -0,0 +1,15 @@ + + + + + + labels + + + \ No newline at end of file