Merge pull request #60806 from pfertyk/issue-60466-nan-in-windows-size

This commit is contained in:
Rémi Verschelde 2022-06-15 14:55:01 +02:00 committed by GitHub
commit 2cad0055fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1529,6 +1529,8 @@ void OS_X11::set_window_size(const Size2 p_size) {
int old_h = xwa.height;
Size2 size = p_size;
ERR_FAIL_COND(Math::is_nan(size.x) || Math::is_nan(size.y));
size.x = MAX(1, size.x);
size.y = MAX(1, size.y);