diff options
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/mesh_instance_3d_editor_plugin.cpp | 7 | ||||
-rw-r--r-- | editor/plugins/polygon_2d_editor_plugin.cpp | 3 |
2 files changed, 3 insertions, 7 deletions
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp index f7a90b8ab3..ccefdcd28f 100644 --- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp @@ -337,18 +337,15 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) { const Vector2 *r = uv.ptr(); Vector<int> indices = a[Mesh::ARRAY_INDEX]; - const int *ri; + const int *ri = NULL; int ic; - bool use_indices; if (indices.size()) { ic = indices.size(); ri = indices.ptr(); - use_indices = true; } else { ic = uv.size(); - use_indices = false; } for (int j = 0; j < ic; j += 3) { @@ -356,7 +353,7 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) { for (int k = 0; k < 3; k++) { MeshInstance3DEditorEdgeSort edge; - if (use_indices) { + if (ri) { edge.a = r[ri[j + k]]; edge.b = r[ri[j + ((k + 1) % 3)]]; } else { diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index f570baa885..a5bd5aed6b 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -1031,7 +1031,7 @@ void Polygon2DEditor::_uv_draw() { uvs = node->get_polygon(); } - const float *weight_r; + const float *weight_r = NULL; if (uv_edit_mode[3]->is_pressed()) { int bone_selected = -1; @@ -1044,7 +1044,6 @@ void Polygon2DEditor::_uv_draw() { } if (bone_selected != -1 && node->get_bone_weights(bone_selected).size() == uvs.size()) { - weight_r = node->get_bone_weights(bone_selected).ptr(); } } |