diff options
Diffstat (limited to 'source/blender/editors/physics/particle_edit.c')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index c2ead76ff3e..9fc9131ffb2 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * The Original Code is Copyright (C) 2007 by Janne Karhu. * All rights reserved. @@ -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 || ob==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 */ |