We can't clear a NULL buffer, the code didn't make any sense any more because
it wasn't updated when the function was changed as part of UTF-8 transition.
Closes#12529.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775