godot/servers/visual
robfram 3cc2eee4e8 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 8eedb2afe2)
2018-04-28 17:45:25 +02:00
..
SCsub style: Fix PEP8 whitespace issues in Python files 2016-11-01 00:35:16 +01:00
default_mouse_cursor.xpm GODOT IS OPEN SOURCE 2014-02-09 22:10:30 -03:00
rasterizer.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
rasterizer.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
shader_language.cpp Hinted shader uniforms can have a default value 2018-04-28 17:16:07 +02:00
shader_language.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
shader_types.cpp Fixes canvas light shaders. 2018-04-28 16:03:23 +02:00
shader_types.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
visual_server_canvas.cpp Fix crash in `canvas_item_add_polyline` when passing more points than colors 2018-04-28 17:45:25 +02:00
visual_server_canvas.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
visual_server_global.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
visual_server_global.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
visual_server_light_baker.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
visual_server_light_baker.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
visual_server_raster.cpp Fixed several leaks in VisualServerScene, RasterizerSceneGLES3 and RasterizerGLES3 2018-03-29 00:29:06 +02:00
visual_server_raster.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
visual_server_scene.cpp Fixed several leaks in VisualServerScene, RasterizerSceneGLES3 and RasterizerGLES3 2018-03-29 00:29:06 +02:00
visual_server_scene.h Fix inconsistencies and typos in argument names 2018-02-04 20:10:13 +01:00
visual_server_viewport.cpp Fix wrong viewport transparent-bg 2018-01-18 19:11:07 +01:00
visual_server_viewport.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
visual_server_wrap_mt.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
visual_server_wrap_mt.h Fix typos in code and docs with codespell 2018-01-18 22:01:42 +01:00