Don't dereference "ecif" before NULL check

Fixes #260
This commit is contained in:
Tom Tromey
2016-06-17 10:09:44 +01:00
parent c0829e6284
commit cf4b2a5041

View File

@@ -46,12 +46,12 @@ void ffi_prep_args(void* stack, extended_cif* ecif)
void** p_argv;
void* stack_args_p = stack;
p_argv = ecif->avalue;
if (ecif == NULL || ecif->cif == NULL) {
return; /* no description to prepare */
}
p_argv = ecif->avalue;
if ((ecif->cif->rtype != NULL) &&
(ecif->cif->rtype->type == FFI_TYPE_STRUCT))
{