Bugfix: Forgot to initialize m_Arguments

This commit is contained in:
Gunnar Beutner 2012-04-02 13:16:22 +02:00
parent 0e215f112a
commit 8c6d3cd5b7
2 changed files with 8 additions and 0 deletions

View File

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

View File

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