You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-04 17:04:49 +00:00
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:
@@ -739,9 +739,19 @@ Error OS_Android::create_process(const String &p_path, const List<String> &p_arg
|
||||
}
|
||||
|
||||
Error OS_Android::create_instance(const List<String> &p_arguments, ProcessID *r_child_id) {
|
||||
godot_java->create_new_godot_instance(p_arguments);
|
||||
int instance_id = godot_java->create_new_godot_instance(p_arguments);
|
||||
if (r_child_id) {
|
||||
*r_child_id = instance_id;
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
Error OS_Android::kill(const ProcessID &p_pid) {
|
||||
if (godot_java->force_quit(nullptr, p_pid)) {
|
||||
return OK;
|
||||
}
|
||||
return OS_Unix::kill(p_pid);
|
||||
}
|
||||
|
||||
OS_Android::~OS_Android() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user