Commit 3f3418cc authored by Aleksy Barcz's avatar Aleksy Barcz

launch query executor after all configs are loaded

+ launch query executor as the last step of OnInit
+ this fixes a segfault when QueryExecutor tries to SetProberAddress while OnInit didn't finish loading configurations
+ probably this worked previously only because configurations loaded fast enough
parent ec8d2a29
......@@ -415,12 +415,6 @@ bool DrawApp::OnInit() {
m_dbmgr->SetBaseHandler(base_handler);
m_dbmgr->SetProbersAddresses(GetProbersAddresses());
splash->PushStatusText(_("Starting database query mechanism..."));
m_executor = new QueryExecutor(m_db_queue, m_dbmgr, m_dbmgr->GetBaseHandler());
m_executor->Create();
m_executor->SetPriority((WXTHREAD_MAX_PRIORITY + WXTHREAD_DEFAULT_PRIORITY) / 2);
m_executor->Run();
m_cfg_mgr->SetDatabaseManager(m_dbmgr);
......@@ -484,6 +478,12 @@ bool DrawApp::OnInit() {
return FALSE;
}
splash->PushStatusText(_("Starting database query mechanism..."));
m_executor = new QueryExecutor(m_db_queue, m_dbmgr, m_dbmgr->GetBaseHandler());
m_executor->Create();
m_executor->SetPriority((WXTHREAD_MAX_PRIORITY + WXTHREAD_DEFAULT_PRIORITY) / 2);
m_executor->Run();
wxToolTip::SetDelay(1000);
SetAppName(_T("SZARPDRAW3"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment