From: Marcus Holland-Moritz Date: Sat, 28 Feb 2004 15:04:41 +0000 (+0000) Subject: Fix segfaults when running under -Dx. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5411ce9fb8ad873e4a86f799ff781c1fac61d4c2;p=p5sagit%2Fp5-mst-13.2.git Fix segfaults when running under -Dx. p4raw-id: //depot/perl@22406 --- diff --git a/dump.c b/dump.c index 69fa933..049f948 100644 --- a/dump.c +++ b/dump.c @@ -454,7 +454,7 @@ sequence(pTHX_ register OP *o) case OP_COND_EXPR: case OP_RANGE: hv_store(Sequence, key, len, newSVuv(++seq), 0); - for (l = cLOGOPo->op_other; l->op_type == OP_NULL; l = l->op_next) + for (l = cLOGOPo->op_other; l && l->op_type == OP_NULL; l = l->op_next) ; sequence(aTHX_ l); break; @@ -462,13 +462,13 @@ sequence(pTHX_ register OP *o) case OP_ENTERLOOP: case OP_ENTERITER: hv_store(Sequence, key, len, newSVuv(++seq), 0); - for (l = cLOOPo->op_redoop; l->op_type == OP_NULL; l = l->op_next) + for (l = cLOOPo->op_redoop; l && l->op_type == OP_NULL; l = l->op_next) ; sequence(aTHX_ l); - for (l = cLOOPo->op_nextop; l->op_type == OP_NULL; l = l->op_next) + for (l = cLOOPo->op_nextop; l && l->op_type == OP_NULL; l = l->op_next) ; sequence(aTHX_ l); - for (l = cLOOPo->op_lastop; l->op_type == OP_NULL; l = l->op_next) + for (l = cLOOPo->op_lastop; l && l->op_type == OP_NULL; l = l->op_next) ; sequence(aTHX_ l); break; @@ -477,7 +477,7 @@ sequence(pTHX_ register OP *o) case OP_MATCH: case OP_SUBST: hv_store(Sequence, key, len, newSVuv(++seq), 0); - for (l = cPMOPo->op_pmreplstart; l->op_type == OP_NULL; l = l->op_next) + for (l = cPMOPo->op_pmreplstart; l && l->op_type == OP_NULL; l = l->op_next) ; sequence(aTHX_ l); break;