summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-03-09 23:52:20 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-03-09 23:52:20 -0700
commit110e155595d397e5328f6f7af33e430d1a361bbc (patch)
tree1a7b5cf655b630bee59ba263201a8bcba843591e /match.c
parentde2624b04b91359337d4cd5e29b97720ed61df1b (diff)
downloadtxr-110e155595d397e5328f6f7af33e430d1a361bbc.tar.gz
txr-110e155595d397e5328f6f7af33e430d1a361bbc.tar.bz2
txr-110e155595d397e5328f6f7af33e430d1a361bbc.zip
* match.c (v_trailer): Fix segfault. The code which
helps implement the special interaction between @(accept) and @(trailer) was not handling the situation when there is not current unwind exit point.
Diffstat (limited to 'match.c')
-rw-r--r--match.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/match.c b/match.c
index a82f47da..9b2a6900 100644
--- a/match.c
+++ b/match.c
@@ -2129,7 +2129,7 @@ static val v_trailer(match_files_ctx *c)
*/
uw_unwind {
uw_frame_t *ex = uw_current_exit_point();
- if (ex->uw.type == UW_BLOCK && ex->bl.protocol == accept_s)
+ if (ex && ex->uw.type == UW_BLOCK && ex->bl.protocol == accept_s)
rplacd(ex->bl.result, cons(c->data, c->data_lineno));
}