summaryrefslogtreecommitdiff
path: root/kicad/pl-parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'kicad/pl-parse.c')
-rw-r--r--kicad/pl-parse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kicad/pl-parse.c b/kicad/pl-parse.c
index c22e171..7a09dd8 100644
--- a/kicad/pl-parse.c
+++ b/kicad/pl-parse.c
@@ -543,9 +543,13 @@ struct pl_ctx *pl_parse_search(const char *name, const struct file *related)
{
struct file file;
struct pl_ctx *pl;
+ bool res;
if (name) {
- if (!pl_find_file(&file, name, related))
+ diag_defer_begin();
+ res = pl_find_file(&file, name, related);
+ diag_defer_end(!res);
+ if (!res)
return NULL;
pl = pl_parse(&file);
file_close(&file);