mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-14 02:22:46 +00:00
fix six possible "divide by zero"
This commit is contained in:
@@ -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() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user