@@ -637,10 +637,6 @@ void CYAServerDlg::init_param()
void CYAServerDlg::stop_and_exit()
{
- ::SetMainWnd(NULL);
- ::SetInfoList(NULL);
-
if(is_start_tcp){
stop_tcp_server();
}
@@ -648,6 +644,9 @@ void CYAServerDlg::stop_and_exit()
ws_logout();
+ ::SetMainWnd(NULL);
+ ::SetInfoList(NULL);
+
g_exit = true;
if(m_thread_monitor){
WaitForSingleObject(m_thread_monitor->m_hThread, 0);