diff options
-rw-r--r-- | src/map.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -659,6 +659,16 @@ _db_tmx_map_el_start(void *pv, const char *name, const char **attr) db_xml_node_push(p, map, _db_tmx_data_start, _db_tmx_layer_end, NULL); } else if (db_xml_check_tag(name, "objectgroup")) { + if (map->fr == 0) { + db_err("Map framerate not set"); + XML_StopParser(p, XML_FALSE); + return; + } + if (map->tileset_tail == NULL) { + db_err("Map tileset(s) must precede objects"); + XML_StopParser(p, XML_FALSE); + return; + } db_xml_node_push(p, map, _db_tmx_object_start, _db_tmx_objectgroup_end, NULL); } else { |