Skip to content
Browse files

In Parrot_warn, check that we have a valid interp->ctx before doing f…

…lag testing on it. If we warn during interp initialization, bad things might happen otherwise. mls++ for the report
  • Loading branch information...
1 parent 9759af2 commit 002e27962475d7cc25798fa19945b165fd051e67 @Whiteknight Whiteknight committed Jul 6, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/warnings.c
View
2 src/warnings.c
@@ -108,7 +108,7 @@ Parrot_warn(PARROT_INTERP, INTVAL warnclass,
ARGIN(const char *message), ...)
{
ASSERT_ARGS(Parrot_warn)
- if (!PARROT_WARNINGS_test(interp, warnclass))
+ if (!PMC_IS_NULL(interp->ctx) && !PARROT_WARNINGS_test(interp, warnclass))
return 2;
else {
STRING *targ;

1 comment on commit 002e279

@cotto
cotto commented on 002e279 Jul 6, 2011

and a test?

Please sign in to comment.
Something went wrong with that request. Please try again.