Cycles: Don't use guarded vector for statically initialized data
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 24 Oct 2016 12:18:22 +0000 (14:18 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 24 Oct 2016 12:18:22 +0000 (14:18 +0200)
This will confuse hell of a guarded allocators because it is possible
to have allocation happened prior to Blender's guarded allocator is
fully initialized.

This was causing crashes and assert failures when running blender
with fully guarded memory allocator.

intern/cycles/graph/node_type.h

index e89bb5b3c1f4ff0216ca3a9aabd00138e70eca24..1fb135f6d2263e512bc6feebc648c885d6a3d793 100644 (file)
@@ -125,8 +125,8 @@ struct NodeType
 
        ustring name;
        Type type;
-       vector<SocketType> inputs;
-       vector<SocketType> outputs;
+       vector<SocketType, std::allocator<SocketType> > inputs;
+       vector<SocketType, std::allocator<SocketType> > outputs;
        CreateFunc create;
 
        static NodeType *add(const char *name, CreateFunc create, Type type = NONE);