BUG:376497 Take more care with the KoSelection object
Check the pointer, and where we keep a pointer to it locally, use QPointer.