Merge pull request #8228 from Hinsbart/viewport_fix
Viewport: Fix undefined behaviour found by llvm sanitizer.
This commit is contained in:
commit
dee7fb5ab5
1 changed files with 2 additions and 2 deletions
|
@ -1401,7 +1401,7 @@ void Viewport::_vp_input(const InputEvent &p_ev) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
if (get_tree()->is_editor_hint() && get_tree()->get_edited_scene_root()->is_a_parent_of(this)) {
|
if (get_tree()->is_editor_hint() && get_tree()->get_edited_scene_root() && get_tree()->get_edited_scene_root()->is_a_parent_of(this)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1422,7 +1422,7 @@ void Viewport::_vp_unhandled_input(const InputEvent &p_ev) {
|
||||||
if (disable_input)
|
if (disable_input)
|
||||||
return;
|
return;
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
if (get_tree()->is_editor_hint() && get_tree()->get_edited_scene_root()->is_a_parent_of(this)) {
|
if (get_tree()->is_editor_hint() && get_tree()->get_edited_scene_root() && get_tree()->get_edited_scene_root()->is_a_parent_of(this)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue