[template-glib] template: break out of iterator if expand fails
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [template-glib] template: break out of iterator if expand fails
- Date: Tue, 9 Aug 2016 21:30:42 +0000 (UTC)
commit 88eea2ffb97eabfe5e970b6d5294abac863d32d5
Author: Christian Hergert <chergert redhat com>
Date: Tue Aug 9 14:29:43 2016 -0700
template: break out of iterator if expand fails
If a descendant fails during expansion, short circuit the loop.
src/tmpl-template.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/tmpl-template.c b/src/tmpl-template.c
index e5ac490..5ff2bb0 100644
--- a/src/tmpl-template.c
+++ b/src/tmpl-template.c
@@ -395,6 +395,9 @@ tmpl_template_expand_visitor (TmplNode *node,
TMPL_CLEAR_VALUE (&value);
tmpl_node_visit_children (node, tmpl_template_expand_visitor, state);
+
+ if (state->result == FALSE)
+ break;
}
state->scope = old_scope;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]