File tree 2 files changed +22
-19
lines changed
2 files changed +22
-19
lines changed Original file line number Diff line number Diff line change @@ -2310,25 +2310,28 @@ void frmStatus::OnRefresh(wxCommandEvent &event)
2310
2310
2311
2311
void frmStatus::checkConnection ()
2312
2312
{
2313
- if (!locks_connection->IsAlive ())
2314
- {
2315
- locks_connection = connection;
2316
- }
2317
- if (!connection->IsAlive ())
2318
- {
2319
- delete connection;
2320
- connection = 0 ;
2321
- statusTimer->Stop ();
2322
- locksTimer->Stop ();
2323
- if (xactTimer)
2324
- xactTimer->Stop ();
2325
- if (logTimer)
2326
- logTimer->Stop ();
2327
- if (querystateTimer)
2328
- querystateTimer->Stop ();
2329
- actionMenu->Enable (MNU_REFRESH, false );
2330
- toolBar->EnableTool (MNU_REFRESH, false );
2331
- statusBar->SetStatusText (_ (" Connection broken." ));
2313
+ if (connection) {
2314
+ if (!locks_connection->IsAlive ())
2315
+ {
2316
+ locks_connection = connection;
2317
+ }
2318
+ if (!connection->IsAlive ())
2319
+ {
2320
+ if (locks_connection==connection) locks_connection = 0 ;
2321
+ delete connection;
2322
+ connection = 0 ;
2323
+ statusTimer->Stop ();
2324
+ locksTimer->Stop ();
2325
+ if (xactTimer)
2326
+ xactTimer->Stop ();
2327
+ if (logTimer)
2328
+ logTimer->Stop ();
2329
+ if (querystateTimer)
2330
+ querystateTimer->Stop ();
2331
+ actionMenu->Enable (MNU_REFRESH, false );
2332
+ toolBar->EnableTool (MNU_REFRESH, false );
2333
+ statusBar->SetStatusText (_ (" Connection broken." ));
2334
+ }
2332
2335
}
2333
2336
}
2334
2337
You can’t perform that action at this time.
0 commit comments