Permalink
Browse files

Avoid a NULL deref.

  • Loading branch information...
1 parent c673b0f commit e7596b694d21cba6c20e750a070aafd386debbf3 @jnthn jnthn committed Jun 21, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/vm/parrot/guts/bind.c
View
7 src/vm/parrot/guts/bind.c
@@ -492,9 +492,10 @@ Rakudo_binding_bind_one_param(PARROT_INTERP, PMC *lexpad, Rakudo_Signature *sign
if (!PMC_IS_NULL(param->coerce_type)) {
/* Coercing natives not possible - nothing to call a method on. */
if (bv.type != BIND_VAL_OBJ) {
- *error = Parrot_sprintf_c(interp,
- "Unable to coerce natively typed parameter '%S'",
- param->variable_name);
+ if (error)
+ *error = Parrot_sprintf_c(interp,
+ "Unable to coerce natively typed parameter '%S'",
+ param->variable_name);
return BIND_RESULT_FAIL;
}

0 comments on commit e7596b6

Please sign in to comment.