summaryrefslogtreecommitdiff
path: root/warnings.h
diff options
context:
space:
mode:
Diffstat (limited to 'warnings.h')
-rw-r--r--warnings.h3
1 files changed, 2 insertions, 1 deletions
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)) || \