remove unused and dangerous code to avoid wild pointer.
Created by: 10km
while the 'bAutoDestroy' argument of 'doModal' is TRUE,the 'MainWindowThreadCleanup' will be called before return , and mMainWnd.hwnd will be free, so after calling 'doModal',the mMainWnd.hwnd will be a wild pointer,can't and need not call 'MainWindowThreadCleanup' again. see also my blog: https://blog.csdn.net/10km/article/details/85229859