From 16a2c38f38d56cb7a29bf52c0d959aeaacd4e8f3 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Fri, 14 Dec 2012 21:24:17 +0000 Subject: [PATCH] bugfix for the reasoner in the C runtime --- src/runtime/c/pgf/reasoner.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/runtime/c/pgf/reasoner.c b/src/runtime/c/pgf/reasoner.c index 9a15bded7..f1b0f76d1 100644 --- a/src/runtime/c/pgf/reasoner.c +++ b/src/runtime/c/pgf/reasoner.c @@ -68,8 +68,10 @@ pgf_reasoner_cat_init(PgfReasoner* rs, return false; } - PgfExprQState q = {cont, cont_prob, 0, abscat}; - gu_buf_heap_push(rs->pqueue, &pgf_expr_qstate_order, &q); + if (abscat->n_functions > 0) { + PgfExprQState q = {cont, cont_prob, 0, abscat}; + gu_buf_heap_push(rs->pqueue, &pgf_expr_qstate_order, &q); + } return true; }