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:
parent
9e392656ab
commit
6755fa8b8d
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue