2.5
authorMartin Poirier <theeth@yahoo.com>
Thu, 8 Jan 2009 16:52:30 +0000 (16:52 +0000)
committerMartin Poirier <theeth@yahoo.com>
Thu, 8 Jan 2009 16:52:30 +0000 (16:52 +0000)
Crash when loading certain files with armature. Use scene from context instead of local var (which can be null).

source/blender/blenkernel/intern/blender.c

index 262a2b357133860b9c2eedf6df7cdbca7d6c5034..6f88d3381a9d750ee2d068d44760557847a6454a 100644 (file)
@@ -378,7 +378,7 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, char *filename)
        /* last stage of do_versions actually, that sets recalc flags for recalc poses */
        for(ob= G.main->object.first; ob; ob= ob->id.next) {
                if(ob->type==OB_ARMATURE)
-                       if(ob->recalc) object_handle_update(curscene, ob);
+                       if(ob->recalc) object_handle_update(CTX_data_scene(C), ob);
        }
        
        /* now tag update flags, to ensure deformers get calculated on redraw */