diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-08-18 06:24:49 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-08-18 06:24:49 -0700 |
commit | 5487606fda75f133e26900aede1430b8929f8e18 (patch) | |
tree | 642f7096d06f3cc16225f5ab0d52b8efb52c08ca | |
parent | fe32e5128742221e067fbb96fa7fcb07dae2bd22 (diff) | |
download | subsurface-5487606fda75f133e26900aede1430b8929f8e18.tar.gz |
Fix crash when editing weight system info
I missed one instance where a callback function needed to be passed the widget
index w_idx in the signal_connect function. It got passed a pointer to the
model instead which of course blew up when trying to dereference the array with
that "index".
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | equipment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/equipment.c b/equipment.c index 71639c9d1..d10310c16 100644 --- a/equipment.c +++ b/equipment.c @@ -1397,7 +1397,7 @@ GtkWidget *weightsystem_list_widget(int w_idx) tree_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model)); gtk_widget_set_can_focus(tree_view, FALSE); - g_signal_connect(tree_view, "row-activated", G_CALLBACK(ws_row_activated_cb), model); + g_signal_connect(tree_view, "row-activated", G_CALLBACK(ws_row_activated_cb), GINT_TO_POINTER(w_idx)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view)); gtk_tree_selection_set_mode(GTK_TREE_SELECTION(selection), GTK_SELECTION_BROWSE); |