define stack vars as static to be still set in callback func

Just encountered an issue with one of my latest pulls.
In Gtk, if you try to select one host to any target, ist just gets deleted from the host list.

This is due to the variable which is copied by reference to the callback function not declared as static. In the scope of the callback function, the pointer value isn't set.