diff options
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_mesh_conv.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh_conv.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c index 474b4656a68..340b0b70772 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_conv.c +++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c @@ -590,8 +590,12 @@ BLI_INLINE void bmesh_quick_edgedraw_flag(MEdge *med, BMEdge *e) } } +/** + * + * \param bmain May be NULL in case \a calc_object_remap parameter option is set. + */ void BM_mesh_bm_to_me( - BMesh *bm, Mesh *me, + Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMeshParams *params) { MLoop *mloop; @@ -752,11 +756,12 @@ void BM_mesh_bm_to_me( /* patch hook indices and vertex parents */ if (params->calc_object_remap && (ototvert > 0)) { + BLI_assert(bmain != NULL); Object *ob; ModifierData *md; BMVert **vertMap = NULL; - for (ob = G.main->object.first; ob; ob = ob->id.next) { + for (ob = bmain->object.first; ob; ob = ob->id.next) { if ((ob->parent) && (ob->parent->data == me) && ELEM(ob->partype, PARVERT1, PARVERT3)) { if (vertMap == NULL) { |