aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-01-30 14:13:53 -0200
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-01-30 14:13:53 -0200
commit0b9b18cae6dbf70becd614daf5612426872bf4a3 (patch)
tree83ff5802737b7f072cc3b2b9c63816386b7ca8c1
parenteolian_gen: support for iterative freeing of struct fields (diff)
downloadefl-devs/lauromoura/eolian-inlist-inarray.tar.gz
eolian: Avoid segfault when parsing types like inlist<int>.devs/lauromoura/eolian-inlist-inarray
-rw-r--r--src/lib/eolian/database_validate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index 2a98f6fdba..a8ba53a545 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -250,7 +250,8 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
*/
if (!_validate_type(vals, tp->base_type))
return EINA_FALSE;
- if (tp->base_type->tdecl->type != EOLIAN_TYPEDECL_STRUCT_INLIST)
+ if ((tp->base_type->tdecl == NULL) ||
+ (tp->base_type->tdecl->type != EOLIAN_TYPEDECL_STRUCT_INLIST))
{
_eo_parser_log(&tp->base_type->base,
"inlists can only point at inlist structs");