We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ada77b7 commit 575b951Copy full SHA for 575b951
src/xpath.c
@@ -8438,16 +8438,18 @@ int
8438
lyxp_eval(const char *expr, const struct lyd_node *cur_node, enum lyxp_node_type cur_node_type,
8439
const struct lys_module *local_mod, struct lyxp_set *set, int options)
8440
{
8441
- struct ly_ctx *ctx = local_mod ? local_mod->ctx : NULL;
+ struct ly_ctx *ctx;
8442
struct lyxp_expr *exp;
8443
uint16_t exp_idx = 0;
8444
int rc = -1;
8445
8446
- if (!expr || !set) {
+ if (!expr || !local_mod || !set) {
8447
LOGARG;
8448
return EXIT_FAILURE;
8449
}
8450
8451
+ ctx = local_mod->ctx;
8452
+
8453
exp = lyxp_parse_expr(ctx, expr);
8454
if (!exp) {
8455
rc = -1;
0 commit comments