summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 32b2e0e..d297af1 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -509,6 +509,11 @@ bool eval_fstype(const struct bfs_expr *expr, struct bfs_eval *state) {
}
const char *type = bfs_fstype(mtab, statbuf);
+ if (!type) {
+ eval_report_error(state);
+ return false;
+ }
+
return strcmp(type, expr->argv[1]) == 0;
}