Skip to content

Commit

Permalink
Merge pull request #44218 from aaronfranke/grid-inst-err
Browse files Browse the repository at this point in the history
Fix trying to set grid visibility on an invalid instance
  • Loading branch information
akien-mga authored Dec 9, 2020
2 parents 114f97f + 8c1d94e commit c567a97
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions editor/plugins/node_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4999,9 +4999,6 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
for (int i = 0; i < 3; ++i) {
if (grid_enable[i]) {
grid_visible[i] = grid_enabled;
if (grid_instance[i].is_valid()) {
RenderingServer::get_singleton()->instance_set_visible(grid_instance[i], grid_enabled);
}
}
}
_finish_grid();
Expand Down Expand Up @@ -6160,7 +6157,6 @@ void Node3DEditor::clear() {
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_ORIGIN), true);
for (int i = 0; i < 3; ++i) {
if (grid_enable[i]) {
RenderingServer::get_singleton()->instance_set_visible(grid_instance[i], true);
grid_visible[i] = true;
}
}
Expand Down

0 comments on commit c567a97

Please sign in to comment.