summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/http_request.h2
-rw-r--r--scene/main/scene_tree.cpp2
-rw-r--r--scene/main/scene_tree.h4
-rw-r--r--scene/main/viewport.cpp3
4 files changed, 7 insertions, 4 deletions
diff --git a/scene/main/http_request.h b/scene/main/http_request.h
index 92b0ff28e9..22e822253f 100644
--- a/scene/main/http_request.h
+++ b/scene/main/http_request.h
@@ -31,8 +31,8 @@
#ifndef HTTPREQUEST_H
#define HTTPREQUEST_H
+#include "core/io/file_access.h"
#include "core/io/http_client.h"
-#include "core/os/file_access.h"
#include "core/os/thread.h"
#include "core/templates/safe_refcount.h"
#include "node.h"
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 3e08f86fc9..e4ba93feec 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -33,10 +33,10 @@
#include "core/config/project_settings.h"
#include "core/debugger/engine_debugger.h"
#include "core/input/input.h"
+#include "core/io/dir_access.h"
#include "core/io/marshalls.h"
#include "core/io/resource_loader.h"
#include "core/object/message_queue.h"
-#include "core/os/dir_access.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
#include "core/string/print_string.h"
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index a2f2adb8f8..78c4c14e97 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -48,8 +48,8 @@ class Material;
class Mesh;
class SceneDebugger;
-class SceneTreeTimer : public Reference {
- GDCLASS(SceneTreeTimer, Reference);
+class SceneTreeTimer : public RefCounted {
+ GDCLASS(SceneTreeTimer, RefCounted);
float time_left = 0.0;
bool process_always = true;
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 17c0023b09..5369792194 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -2547,6 +2547,8 @@ void Viewport::_gui_remove_control(Control *p_control) {
}
Window *Viewport::get_base_window() const {
+ ERR_FAIL_COND_V(!is_inside_tree(), nullptr);
+
Viewport *v = const_cast<Viewport *>(this);
Window *w = Object::cast_to<Window>(v);
while (!w) {
@@ -3336,6 +3338,7 @@ bool Viewport::is_input_handled() const {
return local_input_handled;
} else {
const Viewport *vp = this;
+ ERR_FAIL_COND_V(!is_inside_tree(), false);
while (true) {
if (Object::cast_to<Window>(vp)) {
break;