summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xsutils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xsutils.c b/xsutils.c
index 0f5989b3dd..b4161b0d09 100644
--- a/xsutils.c
+++ b/xsutils.c
@@ -253,6 +253,8 @@ usage:
rv = ST(0);
ST(0) = TARG;
+ if (SvGMAGICAL(rv))
+ mg_get(rv);
if (!(SvOK(rv) && SvROK(rv)))
goto usage;
sv = SvRV(rv);