skip scene_armature_depsgraph_workaround when theres no armatures

This commit is contained in:
Campbell Barton 2014-11-14 14:55:45 +01:00
parent 8d5d6de761
commit 22754cf687
2 changed files with 2 additions and 2 deletions

View File

@ -517,7 +517,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine b_engine, BL::Use
/* color managagement */
#ifdef GLEW_MX
/* When using GLEW MX we need to check whether we've got an OpenGL
* context for crrent window. This is because command line rendering
* context for current window. This is because command line rendering
* doesn't have OpenGL context actually.
*/
if(glewGetContext() != NULL)

View File

@ -1261,7 +1261,7 @@ static void scene_depsgraph_hack(EvaluationContext *eval_ctx, Scene *scene, Scen
static void scene_armature_depsgraph_workaround(Main *bmain)
{
Object *ob;
if (!DAG_id_type_tagged(bmain, ID_OB)) {
if (BLI_listbase_is_empty(&bmain->armature) || !DAG_id_type_tagged(bmain, ID_OB)) {
return;
}
for (ob = bmain->object.first; ob; ob = ob->id.next) {