commit | 4a04e54f80bf232406e481d5995fc0a548f722b3 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Mon Feb 01 08:58:30 2021 +0100 |
committer | Michal Vasko <mvasko@cesnet.cz> | Mon Feb 01 08:58:30 2021 +0100 |
tree | 3baff33514fa1035425530ecb3bf5b88e4b5b977 | |
parent | e17ff5fbcb196ac71e80c2571bf2e8feb4083290 [diff] [blame] |
xpath BUGFIX check ht for existence before duplicating Refs #1393
diff --git a/src/xpath.c b/src/xpath.c index 9dc8d24..69ec47c 100644 --- a/src/xpath.c +++ b/src/xpath.c
@@ -804,7 +804,9 @@ ret->used = ret->size = set->used; ret->ctx_pos = set->ctx_pos; ret->ctx_size = set->ctx_size; - ret->ht = lyht_dup(set->ht); + if (set->ht) { + ret->ht = lyht_dup(set->ht); + } } else { memcpy(ret, set, sizeof *ret); if (set->type == LYXP_SET_STRING) {