Skip to content

window: Fix crash in toast animation

Ray Strode requested to merge fix-toast-crash into main

Every once in a while when I'm deleting an event gnome-calendar crashes.

I dug in a bit, and it seems the reason is adw_toast_overlay_add_toast takes ownership of the passed in reference.

This is a little idiosyncratic for something that's not GInitiallyUnowned, but it appears to be the API nonetheless.

GCalWindow assumes it owns the reference.

This commit makes both users of the toast happy by adding a ref call.

Merge request reports