Skip to content
Snippets Groups Projects
Commit f17b3e59 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Fix GTK+ generic value double initialization

parent 763d01bd
Branches
Tags
No related merge requests found
...@@ -184,7 +184,7 @@ clean_history( void ) ...@@ -184,7 +184,7 @@ clean_history( void )
select_account(GtkTreeSelection *selection, GtkTreeModel *model) select_account(GtkTreeSelection *selection, GtkTreeModel *model)
{ {
GtkTreeIter iter; GtkTreeIter iter;
GValue val; GValue val = {0};
if (!gtk_tree_selection_get_selected(selection, &model, &iter)) if (!gtk_tree_selection_get_selected(selection, &model, &iter))
{ {
...@@ -194,7 +194,7 @@ select_account(GtkTreeSelection *selection, GtkTreeModel *model) ...@@ -194,7 +194,7 @@ select_account(GtkTreeSelection *selection, GtkTreeModel *model)
return; return;
} }
val.g_type = G_TYPE_POINTER; // The Gvalue will be initialized in the following function
gtk_tree_model_get_value(model, &iter, COLUMN_ACCOUNT_DATA, &val); gtk_tree_model_get_value(model, &iter, COLUMN_ACCOUNT_DATA, &val);
selectedAccount = (account_t*)g_value_get_pointer(&val); selectedAccount = (account_t*)g_value_get_pointer(&val);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment