diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-06-12 12:49:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-12 12:49:21 +0200 |
commit | 971b5160c61ccb7a009966d17d339997ea343da3 (patch) | |
tree | ff0d038213821bbf258f9fa9fd36288a7c7d9bbc /modules | |
parent | f160c81f683d8a523f23d3c4f7a76151a75fe875 (diff) | |
parent | 8245db869f05a86e88338236d22765b87cc71db8 (diff) |
Merge pull request #29306 from qarmin/small_code_fixes
Small fixes to unrechable code, possibly overflows, using NULL pointers
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 1 | ||||
-rw-r--r-- | modules/recast/navigation_mesh_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | modules/webm/video_stream_webm.cpp | 7 |
3 files changed, 5 insertions, 7 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 511069222b..ec3e72eef7 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -1995,7 +1995,6 @@ GDScriptParser::Node *GDScriptParser::_reduce_expression(Node *p_node, bool p_to } } - ERR_FAIL_V(op); } break; default: { return p_node; diff --git a/modules/recast/navigation_mesh_editor_plugin.cpp b/modules/recast/navigation_mesh_editor_plugin.cpp index eadc11fcee..9f30806925 100644 --- a/modules/recast/navigation_mesh_editor_plugin.cpp +++ b/modules/recast/navigation_mesh_editor_plugin.cpp @@ -67,9 +67,7 @@ void NavigationMeshEditor::_bake_pressed() { EditorNavigationMeshGenerator::get_singleton()->clear(node->get_navigation_mesh()); EditorNavigationMeshGenerator::get_singleton()->bake(node->get_navigation_mesh(), node); - if (node) { - node->update_gizmo(); - } + node->update_gizmo(); } void NavigationMeshEditor::_clear_pressed() { diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp index 6485c95360..3670edc9ea 100644 --- a/modules/webm/video_stream_webm.cpp +++ b/modules/webm/video_stream_webm.cpp @@ -413,10 +413,11 @@ void VideoStreamPlaybackWebm::delete_pointers() { if (audio_frame) memdelete(audio_frame); - for (int i = 0; i < video_frames_capacity; ++i) - memdelete(video_frames[i]); - if (video_frames) + if (video_frames) { + for (int i = 0; i < video_frames_capacity; ++i) + memdelete(video_frames[i]); memfree(video_frames); + } if (video) memdelete(video); |