Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r--source/blender/blenloader/intern/readfile.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index a4979cc470c..9f6db2264d9 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6413,12 +6413,17 @@ static void lib_link_scene(FileData *fd, Main *main)
sce->set = newlibadr(fd, sce->id.lib, sce->set);
sce->gpd = newlibadr_us(fd, sce->id.lib, sce->gpd);
- link_paint(fd, sce, &sce->toolsettings->sculpt->paint);
- link_paint(fd, sce, &sce->toolsettings->vpaint->paint);
- link_paint(fd, sce, &sce->toolsettings->wpaint->paint);
link_paint(fd, sce, &sce->toolsettings->imapaint.paint);
- link_paint(fd, sce, &sce->toolsettings->uvsculpt->paint);
- link_paint(fd, sce, &sce->toolsettings->gp_paint->paint);
+ if (sce->toolsettings->sculpt)
+ link_paint(fd, sce, &sce->toolsettings->sculpt->paint);
+ if (sce->toolsettings->vpaint)
+ link_paint(fd, sce, &sce->toolsettings->vpaint->paint);
+ if (sce->toolsettings->wpaint)
+ link_paint(fd, sce, &sce->toolsettings->wpaint->paint);
+ if (sce->toolsettings->uvsculpt)
+ link_paint(fd, sce, &sce->toolsettings->uvsculpt->paint);
+ if (sce->toolsettings->gp_paint)
+ link_paint(fd, sce, &sce->toolsettings->gp_paint->paint);
if (sce->toolsettings->sculpt) {
sce->toolsettings->sculpt->gravity_object = newlibadr(