diff options
Diffstat (limited to 'platform/windows/godot_win.cpp')
-rw-r--r-- | platform/windows/godot_win.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/windows/godot_win.cpp b/platform/windows/godot_win.cpp index df2d96e516..6f1fb04706 100644 --- a/platform/windows/godot_win.cpp +++ b/platform/windows/godot_win.cpp @@ -136,8 +136,13 @@ int widechar_main(int argc, wchar_t **argv) { Error err = Main::setup(argv_utf8[0], argc - 1, &argv_utf8[1]); - if (err != OK) + if (err != OK) { + for (int i = 0; i < argc; ++i) { + delete[] argv_utf8[i]; + } + delete[] argv_utf8; return 255; + } if (Main::start()) os.run(); |