Unverified Commit a69302d4 authored by Zander's avatar Zander 💥

Throw error for null {{include}} path

Previous assert would crash the process
parent 2827a669
......@@ -143,7 +143,15 @@ tmpl_lexer_next (TmplLexer *self,
GInputStream *input;
g_assert (self->circular != NULL);
g_assert (path != NULL);
if (path == NULL)
{
local_error = g_error_new (TMPL_ERROR,
TMPL_ERROR_NOT_A_VALUE,
"Expected template path, got null");
g_clear_pointer (token, tmpl_token_free);
TMPL_GOTO (finish);
}
if (g_hash_table_contains (self->circular, path))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment