summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pp.c b/pp.c
index c916bf64a9..3e22febc33 100644
--- a/pp.c
+++ b/pp.c
@@ -2883,6 +2883,8 @@ PP(pp_int)
while (SvAMAGIC(sv)) {
SV *tsv = AMG_CALLun(sv,numer);
+ if (!tsv)
+ break;
if (SvROK(tsv) && SvRV(tsv) == SvRV(sv)) {
SETi(PTR2IV(SvRV(sv)));
RETURN;