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(); }