You need to sign in or sign up before continuing.
consecutive calls to addChild corrupts existing references
Consider the following code below:
smtk::view::ConfigurationPtr config = smtk::view::Configuration::New("my", "view");
auto& child1 = config->details().addChild("child1");
auto& child2 = config->details().addChild("child2");
Due to the automatic resizing of the underlying std::vector storing the components, the reference to child1
is corrupted when child2
is added. Anything accessing the variable child1
will result in a crash later.