Skip to content
  • Georges Basile Stavracas Neto's avatar
    listbox: Store child iter in a variable when removing · 5596feae
    Georges Basile Stavracas Neto authored
    Unparenting a GtkListBoxRow can drop its last reference, which
    will free its memory. Right after unparenting, though, we were
    accessing the row's iter - which assumes that the row is still
    alive. This causes a crash when, for example, binding two or
    more models to the listbox.
    
    Fix that by storing the iter in a variable, and not trying to
    access it after unparenting. After unparenting, the variables
    that are potentially garbage were explicitly assigned NULL for
    clarity.
    
    Fixes GNOME/gtk#1258
    5596feae