I guess you are correct Krzysztof. Making the '
add_node_to_recolor_wheel' function
empty stops Inkscape from crashing. So the problem has to lie
in the casting. I have also tried :
RecolorWheelPrivate *priv;
priv =
G_TYPE_INSTANCE_GET_PRIVATE (wheel,
RECOLOR_TYPE_COLOR_WHEEL,
RecolorWheelPrivate);
// followed by the code (priv->nodes).insert(
std::pair<std::string,RecolorWheelNode>(name,node)
);
but this again leads to a crash.
Finally,
atleast the brickwall is clear to us. Now all we need is a
road roller :)
so the function crashing Inkscape is:
void
add_node_to_recolor_wheel (RecolorWheel *wheel,
std::string name, RecolorWheelNode node)
{
RecolorWheelPrivate *priv = (RecolorWheelPrivate*)
(wheel->priv);
(priv->nodes).insert(
std::pair<std::string,RecolorWheelNode>(name,node)
);
}