diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index c2ead76ff3e..f4486353e47 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -191,7 +191,7 @@ int PE_start_edit(PTCacheEdit *edit) ParticleEditSettings *PE_settings(Scene *scene) { - return &scene->toolsettings->particle; + return scene->toolsettings ? &scene->toolsettings->particle : NULL; } /* always gets atleast the first particlesystem even if PSYS_CURRENT flag is not set @@ -205,12 +205,12 @@ static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create) ListBase pidlist; PTCacheID *pid; + if(pset==NULL || pset->object==NULL) + return NULL; + pset->scene = scene; pset->object = ob; - if(ob==NULL) - return NULL; - BKE_ptcache_ids_from_object(&pidlist, ob); /* in the case of only one editable thing, set pset->edittype accordingly */ |