summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'match.c')
-rw-r--r--match.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/match.c b/match.c
index ad260cdc..38fdfc32 100644
--- a/match.c
+++ b/match.c
@@ -1670,6 +1670,9 @@ static val v_freeform(match_files_ctx *c)
if ((c->spec = rest(c->spec)) == nil) {
sem_error(first_spec,
lit("freeform must be followed by a query line"), nao);
+ } else if (!c->data) {
+ debuglf(specline, lit("freeform match failure: no data"), nao);
+ return nil;
} else {
val limit = or2(if2(nump(first(vals)), first(vals)),
if2(nump(second(vals)), second(vals)));