summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf/reasoner.c
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2012-12-14 21:24:17 +0000
committerkr.angelov <kr.angelov@gmail.com>2012-12-14 21:24:17 +0000
commit16a2c38f38d56cb7a29bf52c0d959aeaacd4e8f3 (patch)
tree70d52f39d91e1710851553aced7cf18614724bda /src/runtime/c/pgf/reasoner.c
parent8ec7ecacca10047b7607f871cd56a8c46a41ba18 (diff)
bugfix for the reasoner in the C runtime
Diffstat (limited to 'src/runtime/c/pgf/reasoner.c')
-rw-r--r--src/runtime/c/pgf/reasoner.c6
1 files 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;
}