summaryrefslogtreecommitdiffstats
path: root/scene/main/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/window.cpp')
-rw-r--r--scene/main/window.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 3a906fd989..b82b215e54 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -1774,7 +1774,7 @@ Rect2i Window::get_usable_parent_rect() const {
} else {
const Window *w = is_visible() ? this : get_parent_visible_window();
//find a parent that can contain us
- ERR_FAIL_COND_V(!w, Rect2());
+ ERR_FAIL_NULL_V(w, Rect2());
parent_rect = DisplayServer::get_singleton()->screen_get_usable_rect(DisplayServer::get_singleton()->window_get_current_screen(w->get_window_id()));
}
@@ -2335,9 +2335,9 @@ Rect2i Window::get_parent_rect() const {
if (is_embedded()) {
//viewport
Node *n = get_parent();
- ERR_FAIL_COND_V(!n, Rect2i());
+ ERR_FAIL_NULL_V(n, Rect2i());
Viewport *p = n->get_viewport();
- ERR_FAIL_COND_V(!p, Rect2i());
+ ERR_FAIL_NULL_V(p, Rect2i());
return p->get_visible_rect();
} else {