diff options
| author | Yuri Sizov <yuris@humnom.net> | 2023-07-27 15:22:54 +0200 |
|---|---|---|
| committer | Yuri Sizov <yuris@humnom.net> | 2023-07-27 15:22:54 +0200 |
| commit | 08e1a6989749760e6827d12469079459c3c3abba (patch) | |
| tree | a1afc03d92645378acdb2e9a2befd827ef671157 | |
| parent | 7a9a0dc51f613d776f988bd01f003c24303cafe7 (diff) | |
| parent | 7fead979d633e5472a485eca0441b5d3633e13fc (diff) | |
| download | redot-engine-08e1a6989749760e6827d12469079459c3c3abba.tar.gz | |
Merge pull request #79937 from Sauermann/fix-expected-safe-rect-error
Disable error condition for accessing safe rect
| -rw-r--r-- | scene/main/viewport.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index d26bb49d09..d9a1cfe965 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -3510,7 +3510,12 @@ void Viewport::subwindow_set_popup_safe_rect(Window *p_window, const Rect2i &p_r Rect2i Viewport::subwindow_get_popup_safe_rect(Window *p_window) const { int index = _sub_window_find(p_window); - ERR_FAIL_COND_V(index == -1, Rect2i()); + // FIXME: Re-enable ERR_FAIL_COND after rewriting embedded window popup closing. + // Currently it is expected, that index == -1 can happen. + if (index == -1) { + return Rect2i(); + } + // ERR_FAIL_COND_V(index == -1, Rect2i()); return gui.sub_windows[index].parent_safe_rect; } |
