summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2006-03-11 22:08:34 +0000
committerSteve Peters <steve@fisharerojo.org>2006-03-11 22:08:34 +0000
commit72c8de1ace969ce661556df13526a4e7e1d7eb93 (patch)
treefef99b7c61bd4cc0585b88749fb1c9fb881aa447 /op.c
parent06dc7ac6fa597f9446b4a27a32d667bbcbde0453 (diff)
downloadperl-72c8de1ace969ce661556df13526a4e7e1d7eb93.tar.gz
Perl_newWHILEOP() had exactly the same lack of a NULL pointer check
that Perl_newLOOPOP() had and fixed in change #27476. Maybe some refactoring is needed? p4raw-link: @27476 on //depot/perl: 06dc7ac6fa597f9446b4a27a32d667bbcbde0453 p4raw-id: //depot/perl@27477
Diffstat (limited to 'op.c')
-rw-r--r--op.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/op.c b/op.c
index 51f962a4ad..9a5dfb1e9a 100644
--- a/op.c
+++ b/op.c
@@ -4299,10 +4299,10 @@ whileline, OP *expr, OP *block, OP *cont, I32 has_my)
break;
case OP_SASSIGN:
- if (k1->op_type == OP_READDIR
+ if (k1 && (k1->op_type == OP_READDIR
|| k1->op_type == OP_GLOB
|| (k1->op_type == OP_NULL && k1->op_targ == OP_GLOB)
- || k1->op_type == OP_EACH)
+ || k1->op_type == OP_EACH))
expr = newUNOP(OP_DEFINED, 0, expr);
break;
}