- if (GTK_TREE_SELECTION (object)->destroy)
- (* GTK_TREE_SELECTION (object)->destroy) (GTK_TREE_SELECTION (object)->user_data);
+ GtkTreeSelection *selection = GTK_TREE_SELECTION (object);
+
+ if (selection->destroy)
+ {
+ GtkDestroyNotify d = selection->destroy;
+
+ selection->destroy = NULL;
+ d (selection->user_data);
+ }