Skip to content
Snippets Groups Projects
Commit 8d11882d authored by notrudyyy's avatar notrudyyy Committed by Sean Kim
Browse files

Fix #128257: Crash when using Set Vertex Colors with no brush

The issue is due to a null pointer dereference in the call to
`IMB_colormanagement_srgb_to_scene_linear_v3` in
`vpaint_get_current_col` in `paint_vertex.cc`.
`BKE_paint_brush_for_read` returns a null pointer and as a result
`brush_color` points to the zero page, thus causing a null pointer
dereference and hence the access violation exception.

Normally, users should not be able to have no brush selected inside
vertex paint mode. Instead of adding null checks everywhere, this
commit protects against this case by switching the poll method to
check for a brush before allowing execution.

Pull Request: https://projects.blender.org/blender/blender/pulls/128260
parent 44fbd693
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment