diff options
| author | Rémi Verschelde | 2016-03-10 16:15:49 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2016-03-10 16:15:49 +0100 |
| commit | aaad24e6fb1528fc6c773c0225ed9500c3fdd2bb (patch) | |
| tree | 050800bfb1afbc562448967ee635834356c43af5 /tools/editor/plugins/spatial_editor_plugin.cpp | |
| parent | 042f8bf88c331197b05e9b250b48ef3f5632b4fe (diff) | |
| parent | 7b07bcaf449ea6cf52c2ac501e48cddbe4bde035 (diff) | |
| download | godot-aaad24e6fb1528fc6c773c0225ed9500c3fdd2bb.tar.gz godot-aaad24e6fb1528fc6c773c0225ed9500c3fdd2bb.tar.zst godot-aaad24e6fb1528fc6c773c0225ed9500c3fdd2bb.zip | |
Merge pull request #3865 from Marqin/coverity
[Coverity] fixed 11 of 537 potential bugs found by Coverity
Diffstat (limited to '')
| -rw-r--r-- | tools/editor/plugins/spatial_editor_plugin.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index e787c7470..79ff78ca0 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -2084,7 +2084,9 @@ void SpatialEditorViewport::_menu_option(int p_option) { count++; } - center/=float(count); + if( count != 0 ) { + center/=float(count); + } cursor.pos=center; } break; @@ -4240,6 +4242,3 @@ SpatialEditorPlugin::SpatialEditorPlugin(EditorNode *p_node) { SpatialEditorPlugin::~SpatialEditorPlugin() { } - - - |
