mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Fix errors and crash with empty ConvexPolygonShape2D
(cherry picked from commit 6fb6090748
)
This commit is contained in:
parent
b993febf28
commit
6c0002afb5
1 changed files with 3 additions and 0 deletions
|
@ -78,6 +78,9 @@ void ConvexPolygonShape2D::_bind_methods() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConvexPolygonShape2D::draw(const RID &p_to_rid, const Color &p_color) {
|
void ConvexPolygonShape2D::draw(const RID &p_to_rid, const Color &p_color) {
|
||||||
|
if (points.size() < 3) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Vector<Color> col;
|
Vector<Color> col;
|
||||||
col.push_back(p_color);
|
col.push_back(p_color);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue