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:
authorAntonio Vazquez <blendergit@gmail.com>2020-08-18 09:39:13 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-08-18 09:39:13 +0300
commitff3ecf4aa95300f3c1d7fac539c9012c87aab39b (patch)
tree0d0043136c5cd0880b654529881131a03eeb9690 /source/blender/blenloader
parenta8a048915e8a1c15bfcbe1382b3ed686dd0fa87f (diff)
parentf94e322ab7f480342b12d7c65406216ca4eed067 (diff)
Merge branch 'blender-v2.90-release'
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_290.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 12b5a297df5..bc13e3b3a39 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -190,17 +190,19 @@ void do_versions_after_linking_290(Main *bmain, ReportList *UNUSED(reports))
/* Patch first frame for old files. */
Scene *scene = bmain->scenes.first;
- LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
- if (ob->type != OB_GPENCIL) {
- continue;
- }
- bGPdata *gpd = ob->data;
- LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
- bGPDframe *gpf = gpl->frames.first;
- if (gpf && gpf->framenum > scene->r.sfra) {
- bGPDframe *gpf_dup = BKE_gpencil_frame_duplicate(gpf);
- gpf_dup->framenum = scene->r.sfra;
- BLI_addhead(&gpl->frames, gpf_dup);
+ if (scene != NULL) {
+ LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
+ if (ob->type != OB_GPENCIL) {
+ continue;
+ }
+ bGPdata *gpd = ob->data;
+ LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
+ bGPDframe *gpf = gpl->frames.first;
+ if (gpf && gpf->framenum > scene->r.sfra) {
+ bGPDframe *gpf_dup = BKE_gpencil_frame_duplicate(gpf);
+ gpf_dup->framenum = scene->r.sfra;
+ BLI_addhead(&gpl->frames, gpf_dup);
+ }
}
}
}