Repository: godotengine/godot (language: cpp)

Issue:
Godot crashes when using one-click deploy
### Tested versions

- Reproducible in 4.4 dev a11364d1e65c5d39996812f1fc3d78823476d376 

### System information

Godot v4.4.dev.mono (1a0f3278a) - EndeavourOS #1 SMP PREEMPT_DYNAMIC Mon, 09 Dec 2024 14:31:57 +0000 on Wayland - X11 display driver, Multi-window, 1 monitor - Vulkan (Mobile) - integrated AMD Radeon Graphics (RADV RENOIR) - AMD Ryzen 7 4800U with Radeon Graphics (16 threads)

### Issue description

Godot crashes when using one-click deploy since #99010 

### Steps to reproduce

Create a project and configure Android export, one-click deploy to android device, then Godot crashes.

### Minimal reproduction project (MRP)

N/A


Discussion / hints:

Fix patch:
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index 2f1efb3ee363..1fbb8368f4ae 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -285,6 +285,9 @@ void EditorRun::stop() {
 }
 
 OS::ProcessID EditorRun::get_current_process() const {
+	if (pids.front() == nullptr) {
+		return 0;
+	}
 	return pids.front()->get();
 }
 


Test patch: