From 0ca83d416bc9919040e3563bcc08e5834269211f Mon Sep 17 00:00:00 2001 From: Scoopta Date: Sat, 20 Jan 2024 22:11:27 -0800 Subject: [PATCH] Fixed closing the file handle when pre_display_exec=true --- src/wofi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wofi.c b/src/wofi.c index d186a18..cb0f744 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -491,7 +491,11 @@ static GtkWidget* create_label(char* mode, char* text, char* search_text, char* } } - pclose(fp_labeltext); + if(pre_display_exec) { + fclose(fp_labeltext); + } else { + pclose(fp_labeltext); + } } if(allow_images) {