From 8c6d3cd5b768b60ae8669c0cd383bdc583b9c643 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 2 Apr 2012 13:16:22 +0200 Subject: [PATCH] Bugfix: Forgot to initialize m_Arguments --- base/application.cpp | 5 +++++ base/application.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/base/application.cpp b/base/application.cpp index 37c226728..1a5c9ddc3 100644 --- a/base/application.cpp +++ b/base/application.cpp @@ -256,6 +256,11 @@ void Application::Log(const char *format, ...) fprintf(stderr, "%s\n", message); } +void Application::SetArguments(const vector& arguments) +{ + m_Arguments = arguments; +} + vector& Application::GetArguments(void) { return m_Arguments; diff --git a/base/application.h b/base/application.h index 212730b65..1b992faca 100644 --- a/base/application.h +++ b/base/application.h @@ -23,6 +23,7 @@ public: virtual int Main(const vector& args) = 0; + void SetArguments(const vector& arguments); vector& 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();