Bad free for Clutter.Point
From swell-foop#13 (comment 620541):
Vala uses g_free
instead of the expected clutter_point_free
to free clutter points, causing a crash.
Reduced example:
public class TileActor : Clutter.Actor
{
public TileActor ()
{
pivot_point.x = 0.5f;
}
}
Compile with valac -cC --pkg=clutter-1.0
. Generated code excerpt:
TileActor*
tile_actor_construct (GType object_type)
{
TileActor * self = NULL;
ClutterPoint* _tmp0_;
ClutterPoint* _tmp1_;
ClutterPoint* _tmp2_;
self = (TileActor*) g_object_new (object_type, NULL);
g_object_get ((ClutterActor*) self, "pivot-point", &_tmp0_, NULL);
_tmp1_ = _tmp0_;
_tmp2_ = _tmp1_;
(*_tmp2_).x = 0.5f;
_g_free0 (_tmp2_);
return self;
}
Yes, this code is pointless (it creates a copy of the pivot point, modifies it and then frees the modified point), but it should not crash.