summaryrefslogtreecommitdiff
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
parent699e156d144c3e4f87a82f93f45aa53647b5bd4d (diff)
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)
250 */ 250 */
251 if (!_validate_type(vals, tp->base_type)) 251 if (!_validate_type(vals, tp->base_type))
252 return EINA_FALSE; 252 return EINA_FALSE;
253 if (tp->base_type->tdecl->type != EOLIAN_TYPEDECL_STRUCT_INLIST) 253 if ((tp->base_type->tdecl == NULL) ||
254 (tp->base_type->tdecl->type != EOLIAN_TYPEDECL_STRUCT_INLIST))
254 { 255 {
255 _eo_parser_log(&tp->base_type->base, 256 _eo_parser_log(&tp->base_type->base,
256 "inlists can only point at inlist structs"); 257 "inlists can only point at inlist structs");