Skip to content

view-cell: Make view property a weak pointer

Corey Berla requested to merge wip/corey/rubberband into main

When the gtk list view is in the process of being destroyed, some of the cells might still exist with an invalid reference to the nautilus view. We are having an problem where the double click idle timeout from the gesture click on the nautilus-view-cell times out when the view-cell hasn't be freed but the nautilus view has. A good way to test this is by clicking an item immediately followed by ctrl+w to close the tab (freeing the view).

I played around with trying to get the gtk list view to free earlier in the process (i.e. before the nautilus list base), but there were still instances where the cell still existed by the time the nautilus view was freed.

To be safe, make the unowned nautilus view a weak pointer of the nautilus view cell so we can safely check for NULL values.

Fixes: #2859 (closed)

Merge request reports