diff --git a/release/scripts/ui/space_view3d_toolbar.py b/release/scripts/ui/space_view3d_toolbar.py index e3c0c2d24b1..a7a8968fb05 100644 --- a/release/scripts/ui/space_view3d_toolbar.py +++ b/release/scripts/ui/space_view3d_toolbar.py @@ -803,8 +803,9 @@ class VIEW3D_PT_tools_weightpaint_options(View3DPanel): col.prop(wpaint, "normals") col.prop(wpaint, "spray") - if context.weight_paint_object.type == 'MESH': - col.prop(data, "use_mirror_x") + obj = context.weight_paint_object + if obj.type == 'MESH': + col.prop(obj.data, "use_mirror_x") # Commented out because the Apply button isn't an operator yet, making these settings useless # col.label(text="Gamma:") diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c index c1bdbf32fac..676b6d4da40 100644 --- a/source/blender/blenlib/intern/pbvh.c +++ b/source/blender/blenlib/intern/pbvh.c @@ -633,6 +633,10 @@ static PBVHNode *pbvh_iter_next(PBVHIter *iter) /* pop node */ iter->stacksize--; node= iter->stack[iter->stacksize].node; + + if(node==NULL) + return NULL; + revisiting= iter->stack[iter->stacksize].revisiting; /* revisiting node already checked */