lihz 8 years ago
parent
commit
f918335105
1 changed files with 3 additions and 4 deletions
  1. 3 4
      YAServerDlg.cpp

+ 3 - 4
YAServerDlg.cpp

@@ -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);