diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2020-09-09 17:05:19 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2020-09-09 17:19:52 +0300 |
commit | fe8509af612805238c2be5d695e2d6f7676fd730 (patch) | |
tree | a488cfeaa2c58042013c3ce4560ac559ad5eb137 /source/blender | |
parent | 8bead3df2ffef1fa249b8c852b03cfcca2400c3d (diff) |
Fix uvsculpt null pointer reference in paint.c
ASAN reported null pointer access when going into edit mode on the
default cube.
Check in uvculpt has been initialized before trying to use it.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index bc089d7bd80..278c6c0ee53 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -406,7 +406,7 @@ Paint *BKE_paint_get_active(Scene *sce, ViewLayer *view_layer) case OB_MODE_WEIGHT_GPENCIL: return &ts->gp_weightpaint->paint; case OB_MODE_EDIT: - return &ts->uvsculpt->paint; + return ts->uvsculpt ? &ts->uvsculpt->paint : NULL; default: break; } |