diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-11-28 14:08:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 14:08:50 +0100 |
commit | 06db076fc6c49fb585e753bd327ce1a80b0bf7d5 (patch) | |
tree | 019e3bf7661e3faa67dcf501511ff9d07349bb1d /editor | |
parent | 39028cc161048ffccd0fae8677c523da648311a5 (diff) | |
parent | cb01268562a47e6a1c32559f58fbadd46e52d304 (diff) |
Merge pull request #24025 from aaronfranke/analyzer-errors
Fix many errors found by PVS-Studio
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_spin_slider.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/animation_state_machine_editor.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/sprite_frames_editor_plugin.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index b6e4375ce9..8ea56b8578 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -154,7 +154,7 @@ void EditorSpinSlider::_grabber_gui_input(const Ref<InputEvent> &p_event) { void EditorSpinSlider::_notification(int p_what) { - if (p_what == MainLoop::NOTIFICATION_WM_FOCUS_OUT || p_what == MainLoop::NOTIFICATION_WM_FOCUS_OUT) { + if (p_what == MainLoop::NOTIFICATION_WM_FOCUS_OUT || p_what == MainLoop::NOTIFICATION_WM_FOCUS_IN) { if (grabbing_spinner) { Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE); grabbing_spinner = false; diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index e83773257b..990c77430f 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -849,7 +849,7 @@ void AnimationNodeStateMachineEditor::_state_machine_pos_draw() { return; int idx = -1; - for (int i = 0; node_rects.size(); i++) { + for (int i = 0; i < node_rects.size(); i++) { if (node_rects[i].node_name == playback->get_current_node()) { idx = i; break; diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 40781908fd..82936d63d2 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -598,7 +598,7 @@ bool SpriteFramesEditor::can_drop_data_fw(const Point2 &p_point, const Variant & return false; for (int i = 0; i < files.size(); i++) { - String file = files[0]; + String file = files[i]; String ftype = EditorFileSystem::get_singleton()->get_file_type(file); if (!ClassDB::is_parent_class(ftype, "Texture")) { |