From 2ec7c6a6bcc340b6bd196ef8be53bcd6469fe177 Mon Sep 17 00:00:00 2001 From: Emmanuel Leblond Date: Tue, 18 Jan 2022 12:48:12 +0100 Subject: Replace use of `OS::set_exit_code()` by `SceneTree::quit()` in `EditorNode` --- core/os/os.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core') diff --git a/core/os/os.h b/core/os/os.h index 6b4e2798bd..36d85da70b 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -295,6 +295,9 @@ public: virtual void debug_break(); virtual int get_exit_code() const; + // `set_exit_code` should only be used from `SceneTree` (or from a similar + // level, e.g. from the `Main::start` if leaving without creating a `SceneTree`). + // For other components, `SceneTree.quit()` should be used instead. virtual void set_exit_code(int p_code); virtual int get_processor_count() const; -- cgit v1.2.3