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...
Whiteknight committed Jul 6, 2011
1 parent 9759af2 commit 002e27962475d7cc25798fa19945b165fd051e67
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/warnings.c
@@ -108,7 +108,7 @@ Parrot_warn(PARROT_INTERP, INTVAL warnclass,
ARGIN(const char *message), ...)
- 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


This comment has been minimized.

Show comment
Hide comment

cotto Jul 6, 2011


and a test?


cotto commented on 002e279 Jul 6, 2011

and a test?

Please sign in to comment.