Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_types.c')
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index d32b8696c9c..394adb1dd3b 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -37,6 +37,7 @@
#include "BKE_customdata.h"
#include "BKE_DerivedMesh.h"
#include "BKE_global.h"
+#include "BKE_library.h"
#include "DEG_depsgraph.h"
@@ -903,8 +904,9 @@ static PyObject *bpy_bmesh_to_mesh(BPy_BMesh *self, PyObject *args)
bm = self->bm;
+ BLI_assert(BKE_id_is_in_gobal_main(&me->id));
BM_mesh_bm_to_me(
- G.main, /* XXX UGLY! */
+ G_MAIN, /* XXX UGLY! */
bm, me,
(&(struct BMeshToMeshParams){
.calc_object_remap = true,