summaryrefslogtreecommitdiff
path: root/core/pool_allocator.cpp
diff options
context:
space:
mode:
authorrobfram <robfram@gmail.com>2018-03-19 19:22:38 +0100
committerrobfram <robfram@gmail.com>2018-03-19 19:22:38 +0100
commit8eedb2afe2b7e00c6317a30e98a388f78be6ac56 (patch)
treed9d00261a0641b2d5fec4ac105cc23cb0d52d888 /core/pool_allocator.cpp
parentebce36c22f1aa27e3ef449565bf1e35c19a3e830 (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/pool_allocator.cpp')
0 files changed, 0 insertions, 0 deletions