--- a/src/shade.hpp +++ b/src/shade.hpp @@ -208,6 +208,9 @@ wf::effect_hook_t pre_hook = [=] () { + // Unshade completion can remove the scene tree's last reference to us. + // Keep the transformer and this member callback alive until it returns. + auto keep_alive = shared_from_this(); /* Follow the view if it has moved to another output since last frame. */ if (view && view->get_output() && (view->get_output() != hook_output)) {