summaryrefslogtreecommitdiff
path: root/pp_sort.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_sort.c')
-rw-r--r--pp_sort.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pp_sort.c b/pp_sort.c
index ae0c9c1a57..4741d71dbd 100644
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1609,8 +1609,10 @@ PP(pp_sort)
copytmps = !sorting_av && PL_sortcop;
for (i=max; i > 0 ; i--) {
if ((*p1 = *p2++)) { /* Weed out nulls. */
- if (copytmps && SvPADTMP(*p1) && !IS_PADGV(*p1))
+ if (copytmps && SvPADTMP(*p1)) {
+ assert(!IS_PADGV(*p1));
*p1 = sv_mortalcopy(*p1);
+ }
SvTEMP_off(*p1);
if (!PL_sortcop) {
if (priv & OPpSORT_NUMERIC) {