Skip to content

Commit

Permalink
Bug 798966 - Uninitialised variable used in dialog-account-picker.c:d…
Browse files Browse the repository at this point in the history
…ialog_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."
  • Loading branch information
nomis committed Jun 24, 2023
1 parent 2628ad0 commit cdf0a37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnucash/import-export/qif-imp/dialog-account-picker.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit cdf0a37

Please sign in to comment.