Fix translation memory leak
authorShadowNinja <shadowninja@minetest.net>
Wed, 21 Jan 2015 20:11:34 +0000 (15:11 -0500)
committerkwolekr <kwolekr@minetest.net>
Thu, 5 Feb 2015 08:24:13 +0000 (03:24 -0500)
src/game.cpp

index bb1f3e933ff64cf76f8500b3f6141a84009842f8..acc7a3a31fab77ab880bd20fc8848f2e14c81e23 100644 (file)
@@ -4206,6 +4206,8 @@ void the_game(bool *kill,
                errorstream << "ServerError: " << e.what() << std::endl;
        } catch (ModError &e) {
                errorstream << "ModError: " << e.what() << std::endl;
-               error_message = narrow_to_wide(e.what()) + wgettext("\nCheck debug.txt for details.");
+               wchar_t *check_msg = wgettext("\nCheck debug.txt for details.");
+               error_message = narrow_to_wide(e.what()) + check_msg;
+               delete [] check_msg;
        }
 }