summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-08-12 07:59:22 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-12 07:59:22 +0000
commit3a08df91973e61b297d61204a23d6df230e5156e (patch)
tree40c4d2fa42b05d3dac8e7ce0565d1006814cfd98 /pp_sys.c
parente2712fae67282d36a3d07d1c5bdba11311d9c306 (diff)
downloadperl-3a08df91973e61b297d61204a23d6df230e5156e.tar.gz
Fix for [perl #23287] segfault in untie.
(Well, at least no more coredump.) p4raw-id: //depot/perl@20630
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index b240b62b20..910fb14fab 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -860,7 +860,7 @@ PP(pp_untie)
if (SvTYPE(sv) == SVt_PVGV && !(sv = (SV *)GvIOp(sv)))
RETPUSHYES;
- if ((mg = SvTIED_mg(sv, how))) {
+ if ((mg = SvTIED_mg(sv, how)) && mg->mg_obj) {
SV *obj = SvRV(mg->mg_obj);
GV *gv;
CV *cv = NULL;