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."
This commit is contained in:
Simon Arlott 2023-06-24 20:13:27 +01:00
parent 2628ad0b6e
commit cdf0a37404
No known key found for this signature in database
GPG Key ID: DF001BFD83E75990

View File

@ -360,7 +360,7 @@ dialog_response_cb (GtkDialog *dialog, gint response_id, gpointer user_data)
QIFAccountPickerDialog * wind = user_data; QIFAccountPickerDialog * wind = user_data;
GtkTreeModel *model; GtkTreeModel *model;
GtkTreeIter iter; GtkTreeIter iter;
gboolean placeholder; gboolean placeholder = TRUE;
if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection
(wind->treeview), &model, &iter)) (wind->treeview), &model, &iter))