From cd27c8ef5df35edd2cc606291f3f7985a61d41d5 Mon Sep 17 00:00:00 2001 From: sapier Date: Sun, 7 Apr 2013 19:41:12 +0200 Subject: replace Server smart pointer with conventional one to gain control over dtor call order --- src/main.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 08af6a37d..b0cabfe81 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1902,16 +1902,6 @@ int main(int argc, char *argv[]) error_message = wgettext("Connection error (timed out?)"); errorstream< Date: Sun, 7 Apr 2013 19:15:17 +0200 Subject: fix memory leaks introduced by invalid gettext usage --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index b0cabfe81..eef65cdb2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1501,7 +1501,9 @@ int main(int argc, char *argv[]) while(device->run() && kill == false) { // Set the window caption - device->setWindowCaption((std::wstring(L"Minetest [")+wgettext("Main Menu")+L"]").c_str()); + wchar_t* text = wgettext("Main Menu"); + device->setWindowCaption((std::wstring(L"Minetest [")+text+L"]").c_str()); + delete[] text; // This is used for catching disconnects try -- cgit v1.2.3