try to avoid crash during tab adding/removal
Differential Revision: https://phabricator.kde.org/D20722