summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hv.c b/hv.c
index f1b3c906f6..a8c48752e6 100644
--- a/hv.c
+++ b/hv.c
@@ -422,6 +422,10 @@ Perl_hv_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
if (!hv)
return NULL;
+ if (SvTYPE(hv) == SVTYPEMASK)
+ return NULL;
+
+ assert(SvTYPE(hv) == SVt_PVHV);
if (SvSMAGICAL(hv) && SvGMAGICAL(hv) && !(action & HV_DISABLE_UVAR_XKEY)) {
MAGIC* mg;