mirror of
https://github.com/godotengine/godot.git
synced 2025-03-07 23:32:58 +08:00
Fix Window.hide() crash when force_native changed
Moved force_native = p_force_native assignment to after is_visible() check, to prevent value from changing after window is shown. Fixes #90609
This commit is contained in:
parent
2886511c18
commit
4ed51933f9
@ -1215,10 +1215,10 @@ void Window::set_force_native(bool p_force_native) {
|
|||||||
if (force_native == p_force_native) {
|
if (force_native == p_force_native) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
force_native = p_force_native;
|
|
||||||
if (is_visible() && !is_in_edited_scene_root()) {
|
if (is_visible() && !is_in_edited_scene_root()) {
|
||||||
WARN_PRINT("Can't change \"force_native\" while a window is displayed. Consider hiding window before changing this value.");
|
ERR_FAIL_MSG("Can't change \"force_native\" while a window is displayed. Consider hiding window before changing this value.");
|
||||||
}
|
}
|
||||||
|
force_native = p_force_native;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Window::get_force_native() const {
|
bool Window::get_force_native() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user