Fix a crash switching from cycles to blender internal, wrong order of freeing.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 22 Nov 2011 14:55:53 +0000 (14:55 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 22 Nov 2011 14:55:53 +0000 (14:55 +0000)
source/blender/editors/space_buttons/buttons_texture.c

index 4446a2e848a649c0b249b46e7c5819a0d92d806a..c0ccaeaea9071edd471d03f55999f25cc8907b69 100644 (file)
@@ -257,8 +257,8 @@ void buttons_texture_context_compute(const bContext *C, SpaceButs *sbuts)
 
        if(!scene_use_new_shading_nodes(scene)) {
                if(ct) {
-                       MEM_freeN(ct);
                        BLI_freelistN(&ct->users);
+                       MEM_freeN(ct);
                        sbuts->texuser= NULL;
                }