bugfix [#20767] Particle edit mode crashes
authorCampbell Barton <ideasman42@gmail.com>
Fri, 22 Jan 2010 21:40:31 +0000 (21:40 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 22 Jan 2010 21:40:31 +0000 (21:40 +0000)
& missing include added

source/blender/blenlib/intern/threads.c
source/blender/editors/physics/particle_edit.c

index e5d0385b6e36878ddf9dfacd61c0df27c1031082..9df746276bd45cc72bf8825265e0e95147bb0993 100644 (file)
@@ -52,6 +52,7 @@
 #include <sys/sysctl.h>
 #else
 #include <unistd.h> 
+#include <sys/time.h>
 #endif
 
 /* ********** basic thread control API ************ 
index eb03d3954d2fb6e7944c577c91f3d27e15a06c17..44e4f938e61c81b55357e710cfb7495485ec219f 100644 (file)
@@ -4065,7 +4065,7 @@ static int particle_edit_toggle_exec(bContext *C, wmOperator *op)
        
                /* mesh may have changed since last entering editmode.
                 * note, this may have run before if the edit data was just created, so could avoid this and speed up a little */
-               if(edit)
+               if(edit && edit->psys)
                        recalc_emitter_field(ob, edit->psys);
                
                toggle_particle_cursor(C, 1);