Fix the issue causing the Godot Android Editor to crash when returning from the launched and running game
The issue was caused because the running game pid was not set, and thus had a value of `0`. When trying to stop the running game, the `EditorRun::stop()` logic would kill the process with pid 0, which on Android corresponds to the running app's own process, thus causing the editor to crash. This issue did not happen on Godot 3 because pid with value of `0` are not considered valid.
This commit is contained in:
parent
18a2e7ff6e
commit
ec4d720850
9 changed files with 132 additions and 48 deletions
|
|
@ -272,7 +272,9 @@ Error EditorRun::run(const String &p_scene, const String &p_write_movie) {
|
|||
OS::ProcessID pid = 0;
|
||||
Error err = OS::get_singleton()->create_instance(args, &pid);
|
||||
ERR_FAIL_COND_V(err, err);
|
||||
pids.push_back(pid);
|
||||
if (pid != 0) {
|
||||
pids.push_back(pid);
|
||||
}
|
||||
}
|
||||
|
||||
status = STATUS_PLAY;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue