fix for crash found when attempting to setup testing environment to find crashes :)

scripts that have `Register` enabled and load another blend file would crash blender.
This commit is contained in:
2012-10-01 14:14:21 +00:00
parent 77b90a94c9
commit b04b8fd0e8

View File

@@ -678,6 +678,11 @@ void BPY_modules_load_user(bContext *C)
else {
Py_DECREF(module);
}
/* check if the script loaded a new file */
if (bmain != CTX_data_main(C)) {
break;
}
}
}
}