mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-12 16:47:42 -05:00

The call to gtk_list_store_clear() in unifontsel_setup_familylist() was causing a call to family_changed() via the GTK signal system, which didn't happen in GTK2. family_changed() in turn was calling unifontsel_select_font(), which got confused when the tree model didn't match reality, and tried to access a bogus tree iterator. This is easily fixed by using the existing fs->inhibit_response flag, which prevents us responding to GTK events when we know they were generated by our own fiddling about with the data; it's just that we never needed to set it in unifontsel_setup_familylist() before. Also, added a check of the return value from the key get_iter call in unifontsel_select_font(), so that it'll at least fail an assertion rather than actually trying to access bogus memory. But that operation _should_ still always succeed, and if it doesn't, it's probably a sign that we need another use of fs->inhibit_response.