if (stash && (hint = lt_hint())) {
SV *orig_pkg = newSVpvn(HvNAME_get(stash), HvNAMELEN_get(stash));
SV *orig_meth = lt_default_meth;
- SV *type_pkg = orig_pkg;
- SV *type_meth = orig_meth;
+ SV *type_pkg = NULL;
+ SV *type_meth = NULL;
SV *code = INT2PTR(SV *, SvUVX(hint));
SvREADONLY_on(orig_pkg);
LEAVE;
}
- if (type_meth == orig_meth)
+ if (!type_pkg) {
+ type_pkg = orig_pkg;
+ SvREFCNT_inc(orig_pkg);
+ }
+
+ if (!type_meth) {
+ type_meth = orig_meth;
SvREFCNT_inc(orig_meth);
+ }
lt_pp_padsv_save();