[template-glib] template: add assertion for return types and errors
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [template-glib] template: add assertion for return types and errors
- Date: Tue, 9 Aug 2016 21:30:37 +0000 (UTC)
commit bcd5dcdde465378a9f0722a26f97aa91dfc2426a
Author: Christian Hergert <chergert redhat com>
Date: Tue Aug 9 14:29:10 2016 -0700
template: add assertion for return types and errors
src/tmpl-template.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/tmpl-template.c b/src/tmpl-template.c
index 12cb8df..e5ac490 100644
--- a/src/tmpl-template.c
+++ b/src/tmpl-template.c
@@ -477,6 +477,8 @@ tmpl_template_expand (TmplTemplate *self,
if (local_scope != NULL)
tmpl_scope_unref (local_scope);
+ g_assert (state.result == TRUE || (state.error == NULL || *state.error != NULL));
+
return state.result;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]