diff options
author | robfram <robfram@gmail.com> | 2018-03-19 19:22:38 +0100 |
---|---|---|
committer | robfram <robfram@gmail.com> | 2018-03-19 19:22:38 +0100 |
commit | 8eedb2afe2b7e00c6317a30e98a388f78be6ac56 (patch) | |
tree | d9d00261a0641b2d5fec4ac105cc23cb0d52d888 /core/io/json.h | |
parent | ebce36c22f1aa27e3ef449565bf1e35c19a3e830 (diff) |
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.
Diffstat (limited to 'core/io/json.h')
0 files changed, 0 insertions, 0 deletions