mirror of https://github.com/Icinga/icinga2.git
Bugfix: Forgot to initialize m_Arguments
This commit is contained in:
parent
0e215f112a
commit
8c6d3cd5b7
|
@ -256,6 +256,11 @@ void Application::Log(const char *format, ...)
|
|||
fprintf(stderr, "%s\n", message);
|
||||
}
|
||||
|
||||
void Application::SetArguments(const vector<string>& arguments)
|
||||
{
|
||||
m_Arguments = arguments;
|
||||
}
|
||||
|
||||
vector<string>& Application::GetArguments(void)
|
||||
{
|
||||
return m_Arguments;
|
||||
|
|
|
@ -23,6 +23,7 @@ public:
|
|||
|
||||
virtual int Main(const vector<string>& args) = 0;
|
||||
|
||||
void SetArguments(const vector<string>& arguments);
|
||||
vector<string>& GetArguments(void);
|
||||
|
||||
void RunEventLoop(void);
|
||||
|
@ -53,6 +54,8 @@ int application_main(int argc, char **argv)
|
|||
for (int i = 0; i < argc; i++)
|
||||
args.push_back(string(argv[i]));
|
||||
|
||||
Application::Instance->SetArguments(args);
|
||||
|
||||
result = Application::Instance->Main(args);
|
||||
|
||||
Application::Instance.reset();
|
||||
|
|
Loading…
Reference in New Issue