Fix T58535 Crash on Load
authorAntonioya <blendergit@gmail.com>
Mon, 3 Dec 2018 08:12:29 +0000 (09:12 +0100)
committerAntonioya <blendergit@gmail.com>
Mon, 3 Dec 2018 08:12:29 +0000 (09:12 +0100)
The particles was not ready when the drawing cache try to use it.

source/blender/draw/engines/gpencil/gpencil_draw_utils.c

index 932a6cc3df0932241651523114568699436e20d5..eaae8033b8bd131b4ae01f3d5fbd26dbc063b051 100644 (file)
@@ -1625,7 +1625,9 @@ void DRW_gpencil_populate_particles(GPENCIL_e_data *e_data, void *vedata)
                Object *ob = cache_ob->ob;
                if (cache_ob->is_dup_ob) {
                        GpencilBatchCache *cache = ob->runtime.gpencil_cache;
-                       DRW_gpencil_shgroups_create(e_data, vedata, ob, cache, cache_ob);
+                       if (cache != NULL) {
+                               DRW_gpencil_shgroups_create(e_data, vedata, ob, cache, cache_ob);
+                       }
                }
        }
 }