diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2019-07-31 22:13:29 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2019-07-31 22:24:34 +0300 |
commit | ea3690e32974005c6ccb871f4e2f49471ad837ab (patch) | |
tree | d7145b6ed375599ee5534c5a1cd102012baf8150 /source/blender/blenloader/intern/readfile.c | |
parent | 77d7cc9ba7a9c23c269cb89e8f6da9c800558973 (diff) |
Fix several undefined-behaviour-sanitizer warnings
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4222
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 15 |
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( |