fix crash on view destruction because of non-deterministic cleanup of objects
Differential Revision: https://phabricator.kde.org/D6817