Using QPointer here doesn't help since it doesn't protect against an already deleted widget being passed in