From cdf0a37404173972b788b7b2468efdb1a063d13e Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Sat, 24 Jun 2023 20:13:27 +0100 Subject: [PATCH] Bug 798966 - Uninitialised variable used in dialog-account-picker.c:dialog_response_cb() The "placeholder" variable in dialog-account-picker.c:dialog_response_cb() may be uninitialised before use if gtk_tree_selection_get_selected() returns false. Initialise it to true: "jralls: The signal is blocked if the account is a placeholder, meaning that one can't post splits to it. One also can't post splits to no account, so the signal should be blocked in that case too." --- gnucash/import-export/qif-imp/dialog-account-picker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnucash/import-export/qif-imp/dialog-account-picker.c b/gnucash/import-export/qif-imp/dialog-account-picker.c index 96fc1372db..ec98c25473 100644 --- a/gnucash/import-export/qif-imp/dialog-account-picker.c +++ b/gnucash/import-export/qif-imp/dialog-account-picker.c @@ -360,7 +360,7 @@ dialog_response_cb (GtkDialog *dialog, gint response_id, gpointer user_data) QIFAccountPickerDialog * wind = user_data; GtkTreeModel *model; GtkTreeIter iter; - gboolean placeholder; + gboolean placeholder = TRUE; if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (wind->treeview), &model, &iter))