fixed: crash in thread plugin
ThreadInfo was not correctly initialized (plugin pointer was null) added to PluginInfo: set_dependency_for(WinixModel * winix_model) git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1162 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
e5d7403c54
commit
aa388e248d
|
@ -61,6 +61,21 @@ void PluginInfo::set_dependency_for(WinixBase * winix_base)
|
||||||
plugin->SetDependencyFor(winix_base);
|
plugin->SetDependencyFor(winix_base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PluginInfo::set_dependency_for(WinixBase & winix_base)
|
||||||
|
{
|
||||||
|
set_dependency_for(&winix_base);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PluginInfo::set_dependency_for(WinixModel * winix_model)
|
||||||
|
{
|
||||||
|
plugin->SetDependencyFor(winix_model);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PluginInfo::set_dependency_for(WinixModel & winix_model)
|
||||||
|
{
|
||||||
|
set_dependency_for(&winix_model);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -201,12 +216,19 @@ bool Plugin::SetDependency(PluginInfo & info)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Plugin::SetDependencyFor(WinixBase * winix_base)
|
void Plugin::SetDependencyFor(WinixBase * winix_base)
|
||||||
{
|
{
|
||||||
winix_base->set_dependency(winix_request);
|
winix_base->set_dependency(winix_request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Plugin::SetDependencyFor(WinixModel * winix_model)
|
||||||
|
{
|
||||||
|
winix_model->set_dependency(winix_request);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Plugin::LoadPlugins(const std::wstring & plugins_dir, const std::vector<std::wstring> & plugins)
|
void Plugin::LoadPlugins(const std::wstring & plugins_dir, const std::vector<std::wstring> & plugins)
|
||||||
{
|
{
|
||||||
for(size_t i=0 ; i<plugins.size() ; ++i)
|
for(size_t i=0 ; i<plugins.size() ; ++i)
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace Winix
|
namespace Winix
|
||||||
{
|
{
|
||||||
class Db;
|
class Db;
|
||||||
|
@ -55,6 +54,7 @@ class Functions;
|
||||||
class Templates;
|
class Templates;
|
||||||
class SessionManager;
|
class SessionManager;
|
||||||
|
|
||||||
|
class WinixModel;
|
||||||
class WinixRequest;
|
class WinixRequest;
|
||||||
|
|
||||||
|
|
||||||
|
@ -130,12 +130,10 @@ struct PluginInfo
|
||||||
|
|
||||||
|
|
||||||
void set_dependency_for(WinixBase * winix_base);
|
void set_dependency_for(WinixBase * winix_base);
|
||||||
|
void set_dependency_for(WinixBase & winix_base);
|
||||||
void set_dependency_for(WinixBase & winix_base)
|
|
||||||
{
|
|
||||||
set_dependency_for(&winix_base);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
void set_dependency_for(WinixModel * winix_model);
|
||||||
|
void set_dependency_for(WinixModel & winix_model);
|
||||||
|
|
||||||
void Clear()
|
void Clear()
|
||||||
{
|
{
|
||||||
|
@ -291,6 +289,7 @@ private:
|
||||||
|
|
||||||
bool SetDependency(PluginInfo & info);
|
bool SetDependency(PluginInfo & info);
|
||||||
void SetDependencyFor(WinixBase * winix_base);
|
void SetDependencyFor(WinixBase * winix_base);
|
||||||
|
void SetDependencyFor(WinixModel * winix_model);
|
||||||
void Lock();
|
void Lock();
|
||||||
void Unlock();
|
void Unlock();
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,7 @@ using namespace Ticket;
|
||||||
info.set_dependency_for(ticket_info);
|
info.set_dependency_for(ticket_info);
|
||||||
ticket_info.SetDb(info.db);
|
ticket_info.SetDb(info.db);
|
||||||
ticket_info.SetTDb(&tdb);
|
ticket_info.SetTDb(&tdb);
|
||||||
ticket_info.SetConfig(info.config);
|
//ticket_info.SetConfig(info.config);
|
||||||
ticket_info.SetSystem(info.system);
|
ticket_info.SetSystem(info.system);
|
||||||
ticket_info.SetCur(info.cur);
|
ticket_info.SetCur(info.cur);
|
||||||
ticket_info.SetFunctions(info.functions);
|
ticket_info.SetFunctions(info.functions);
|
||||||
|
|
|
@ -71,10 +71,10 @@ void TicketInfo::SetDb(Db * pdb)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TicketInfo::SetConfig(Config * pconfig)
|
//void TicketInfo::SetConfig(Config * pconfig)
|
||||||
{
|
//{
|
||||||
config = pconfig;
|
// config = pconfig;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
void TicketInfo::SetSystem(System * psystem)
|
void TicketInfo::SetSystem(System * psystem)
|
||||||
|
|
|
@ -75,7 +75,7 @@ public:
|
||||||
|
|
||||||
void SetTDb(TDb * ptdb);
|
void SetTDb(TDb * ptdb);
|
||||||
void SetDb(Db * pdb);
|
void SetDb(Db * pdb);
|
||||||
void SetConfig(Config * pconfig);
|
//void SetConfig(Config * pconfig);
|
||||||
void SetSystem(System * psystem);
|
void SetSystem(System * psystem);
|
||||||
void SetCur(Cur * pcur);
|
void SetCur(Cur * pcur);
|
||||||
void SetFunctions(Functions * pfunctions);
|
void SetFunctions(Functions * pfunctions);
|
||||||
|
@ -141,7 +141,7 @@ private:
|
||||||
|
|
||||||
Db * db;
|
Db * db;
|
||||||
TDb * tdb;
|
TDb * tdb;
|
||||||
Config * config;
|
//Config * config;
|
||||||
System * system;
|
System * system;
|
||||||
Cur * cur;
|
Cur * cur;
|
||||||
Functions * functions;
|
Functions * functions;
|
||||||
|
|
Loading…
Reference in New Issue