eina: fix possible access to NULL.

CID 1039422.
This commit is contained in:
Cedric BAIL 2014-06-05 22:50:20 +02:00
parent caa2ec1b29
commit adbb9ca1e3
1 changed files with 1 additions and 1 deletions

View File

@ -840,7 +840,7 @@ eina_value_array_value_get(const Eina_Value *src, unsigned int position, Eina_Va
static inline void *
eina_value_list_node_memory_get(const Eina_Value_Type *type, const Eina_List *node)
{
if (node == NULL) return NULL;
if (node == NULL || type == NULL) return NULL;
if (type->value_size <= sizeof(void*))
return (void *)&(node->data);
return node->data;