diff options
| author | robfram | 2018-03-19 19:22:38 +0100 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-04-28 17:45:25 +0200 |
| commit | 3cc2eee4e80564cb802217ba4930ce5c24d6db9a (patch) | |
| tree | 304f2dbb623980fa842f085238927d9c39de4eb6 /doc/classes | |
| parent | 56395b03e10a9f5afc4023f0c1c669d89e6a649f (diff) | |
| download | godot-3cc2eee4e80564cb802217ba4930ce5c24d6db9a.tar.gz godot-3cc2eee4e80564cb802217ba4930ce5c24d6db9a.tar.zst godot-3cc2eee4e80564cb802217ba4930ce5c24d6db9a.zip | |
Fix crash in `canvas_item_add_polyline` when passing more points than colors
When `p_points.size() > p_colors.size()`, it crashed with invalid
array access to `p_colors`. Also, when `p_colors` was an empty
`Vector` it crashed due a missing `else` checking the `size`
condition, as the code handling that special case exists.
This PR fixes the missing `else` for `p_colors.size == 0` and,
following the `canvas_item_add_multiline` spirit, it only uses the
first color for the whole polyline if points and colors differ in
size.
Fix #17621.
(cherry picked from commit 8eedb2afe2b7e00c6317a30e98a388f78be6ac56)
Diffstat (limited to 'doc/classes')
0 files changed, 0 insertions, 0 deletions
