check NULL pointer
This commit is contained in:
parent
af3cdbbff4
commit
fd4e89c2f4
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ edge * r3_node_add_child(node * n, char * pat , node *child) {
|
|||
|
||||
|
||||
void r3_node_append_edge(node *n, edge *e) {
|
||||
if (!n->edges) {
|
||||
if (n->edges == NULL) {
|
||||
n->edge_cap = 3;
|
||||
n->edges = malloc(sizeof(edge) * n->edge_cap);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue