From 6755fa8b8d9be81cf2f1278bd747b437cae9b880 Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Mon, 23 Feb 2026 15:40:12 +0000 Subject: [PATCH] plug-ins: Fix warning in Qbist dialog_save () It is possible for qbist_info.path to be NULL, which makes gtk_file_chooser_set_filename () throw a warning about a NULL filename in save_dialog (). This patch adds the same guard to that call as QBist already has in load_dialog (), to make sure we have an existing file name before trying to set it. --- plug-ins/common/qbist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plug-ins/common/qbist.c b/plug-ins/common/qbist.c index a305c8e109..c7d2ecf0b5 100644 --- a/plug-ins/common/qbist.c +++ b/plug-ins/common/qbist.c @@ -892,7 +892,8 @@ dialog_save (GtkWidget *widget, gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE); - gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), qbist_info.path); + if (qbist_info.path) + gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), qbist_info.path); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {