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.
This commit is contained in:
Alx Sa 2026-02-23 15:40:12 +00:00
parent 9e392656ab
commit 6755fa8b8d

View file

@ -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)
{