Fix crash caused when exiting.

The lost focus event was triggered to the central widget.
Since this widget does not map to a qt widget, there is
no wxWindow derived destructor for it, so the handler
must be set to NULL from the frame.