BUG:378134 Check the pointer before dereferencing
Timing issues on closing krita can lead to the display renderer being gone before the palette docker is closed, which is why we put the pointer in a QPointer.