Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
ea55b400
Commit
ea55b400
authored
Aug 27, 2017
by
Rémi Verschelde
Committed by
GitHub
Aug 27, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10598 from Rubonnek/free-memory
Free memory when Main::setup returns an error
parents
5976e8d7
bd257153
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
godot_win.cpp
platform/windows/godot_win.cpp
+6
-1
godot_x11.cpp
platform/x11/godot_x11.cpp
+3
-1
No files found.
platform/windows/godot_win.cpp
View file @
ea55b400
...
...
@@ -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
();
...
...
platform/x11/godot_x11.cpp
View file @
ea55b400
...
...
@@ -45,8 +45,10 @@ int main(int argc, char *argv[]) {
getcwd
(
cwd
,
PATH_MAX
);
Error
err
=
Main
::
setup
(
argv
[
0
],
argc
-
1
,
&
argv
[
1
]);
if
(
err
!=
OK
)
if
(
err
!=
OK
)
{
free
(
cwd
);
return
255
;
}
if
(
Main
::
start
())
os
.
run
();
// it is actually the OS that decides how to run
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment