summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 8bf9fa7cf1..04ccddb9ab 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -493,6 +493,7 @@ PP(pp_die)
}
else {
SV * const errsv = ERRSV;
+ SvGETMAGIC(errsv);
if (SvROK(errsv)) {
exsv = errsv;
if (sv_isobject(exsv)) {
@@ -513,7 +514,7 @@ PP(pp_die)
}
}
}
- else if (SvPV_const(errsv, len), len) {
+ else if (SvPOK(errsv) && SvCUR(errsv)) {
exsv = sv_mortalcopy(errsv);
sv_catpvs(exsv, "\t...propagated");
}