summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regen/warnings.pl3
-rw-r--r--warnings.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/regen/warnings.pl b/regen/warnings.pl
index 83bf8bc3c4..5721c17b26 100644
--- a/regen/warnings.pl
+++ b/regen/warnings.pl
@@ -462,7 +462,8 @@ is by default enabled even if not within the scope of S<C<use warnings>>.
#define unpackWARN4(x) (((x) >>24) & 0xFF)
#define ckDEAD(x) \
- ( ! specialWARN(PL_curcop->cop_warnings) && \
+ (PL_curcop && \
+ !specialWARN(PL_curcop->cop_warnings) && \
( isWARNf_on(PL_curcop->cop_warnings, WARN_ALL) || \
isWARNf_on(PL_curcop->cop_warnings, unpackWARN1(x)) || \
isWARNf_on(PL_curcop->cop_warnings, unpackWARN2(x)) || \
diff --git a/warnings.h b/warnings.h
index 6d675209f8..01668377fc 100644
--- a/warnings.h
+++ b/warnings.h
@@ -221,7 +221,8 @@ is by default enabled even if not within the scope of S<C<use warnings>>.
#define unpackWARN4(x) (((x) >>24) & 0xFF)
#define ckDEAD(x) \
- ( ! specialWARN(PL_curcop->cop_warnings) && \
+ (PL_curcop && \
+ !specialWARN(PL_curcop->cop_warnings) && \
( isWARNf_on(PL_curcop->cop_warnings, WARN_ALL) || \
isWARNf_on(PL_curcop->cop_warnings, unpackWARN1(x)) || \
isWARNf_on(PL_curcop->cop_warnings, unpackWARN2(x)) || \