Maat_hierarchy在删除group时,不同时删除igraph中的vertex,避免vertex id发生变化,导致段错误

This commit is contained in:
zhengchao
2020-07-02 18:37:51 +08:00
parent 895baa489d
commit 61efaef045
2 changed files with 3 additions and 2 deletions

View File

@@ -474,7 +474,8 @@ static void Maat_hierarchy_group_free(struct Maat_hierarchy* hier, struct Maat_h
}
igraph_vector_destroy(&v);
assert(group->top_group_ids==NULL);
igraph_delete_vertices(&hier->group_graph, igraph_vss_1(group->vertex_id));
//We should not call igraph_delete_vertices, because this is function changes the ids of the vertices.
//igraph_delete_vertices(&hier->group_graph, igraph_vss_1(group->vertex_id));
HASH_DELETE(hh_group_id, hier->hash_group_by_id, group);

View File

@@ -34,7 +34,7 @@
#include "stream_fuzzy_hash.h"
#include "gram_index_engine.h"
int MAAT_FRAME_VERSION_3_0_20200619=1;
int MAAT_FRAME_VERSION_3_0_20200702=1;
int is_valid_table_name(const char* str)
{