summaryrefslogtreecommitdiff
path: root/main/performance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/performance.cpp')
-rw-r--r--main/performance.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/main/performance.cpp b/main/performance.cpp
index 091c52118c..3fb76c22fa 100644
--- a/main/performance.cpp
+++ b/main/performance.cpp
@@ -125,9 +125,7 @@ float Performance::get_monitor(Monitor p_monitor) const {
case OBJECT_NODE_COUNT: {
MainLoop *ml = OS::get_singleton()->get_main_loop();
- if (!ml)
- return 0;
- SceneTree *sml = ml->cast_to<SceneTree>();
+ SceneTree *sml = Object::cast_to<SceneTree>(ml);
if (!sml)
return 0;
return sml->get_node_count();