From c5767a24b9eeb167995c425cc76597c103caf7db Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Tue, 10 Dec 2019 15:45:55 +0100 Subject: Fix T71995: Texture Paint workspace crash with new scene Issue likely caused by 8b31f6fb2169. With this, initializing the toolsystem (e.g. for a new workspace-scene combination) would skip the entire create->initialize routine for image/texture painting settings. Reason being that these are not allocated, unlike other paint settings. So while correctly skipping the create part, it also skipped the initialization, which was still needed. This does further changes in related code to avoid NULL pointer accesses. --- source/blender/blenkernel/BKE_paint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/BKE_paint.h') diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 48f9e1fd95e..536268c067e 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -134,7 +134,7 @@ void BKE_paint_curve_copy_data(struct Main *bmain, struct PaintCurve *BKE_paint_curve_copy(struct Main *bmain, const struct PaintCurve *pc); void BKE_paint_curve_make_local(struct Main *bmain, struct PaintCurve *pc, const bool lib_local); -bool BKE_paint_ensure(const struct ToolSettings *ts, struct Paint **r_paint); +bool BKE_paint_ensure(struct ToolSettings *ts, struct Paint **r_paint); void BKE_paint_init(struct Main *bmain, struct Scene *sce, ePaintMode mode, const char col[3]); void BKE_paint_free(struct Paint *p); void BKE_paint_copy(struct Paint *src, struct Paint *tar, const int flag); -- cgit v1.2.3