change BLO_library_append_begin to take a main argument rather then a context, means...
[blender.git] / source / blender / python / intern / bpy_library.c
index 85bffb5a8cc056196c531fb6615d2c1de41cdbf8..4ce3e0356e27600ef00f1cb9fb79fdc9e951cb40 100644 (file)
@@ -39,6 +39,7 @@
 #include "BKE_library.h"
 #include "BKE_idcode.h"
 #include "BKE_report.h"
+#include "BKE_context.h"
 
 #include "BLI_utildefines.h"
 #include "BLI_string.h"
@@ -317,7 +318,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args))
        flag_all_listbases_ids(LIB_PRE_EXISTING, 1);
 
        /* here appending/linking starts */
-       mainl= BLO_library_append_begin(BPy_GetContext(), &(self->blo_handle), self->relpath);
+       mainl= BLO_library_append_begin(CTX_data_main(BPy_GetContext()), &(self->blo_handle), self->relpath);
 
        {
                int i= 0, code;