* clutter/clutter-actor.c

(clutter_actor_get_abs_allocation_vertices): The initialization of
	the local stage pointer got moved away in revision 3081 so it was
	crashing if the function is called before the layout is run.
This commit is contained in:
Neil Roberts 2008-07-02 16:15:30 +00:00
parent 9056e3ac4c
commit 919efb5a6f
2 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2008-07-02 Neil Roberts <neil@o-hand.com>
* clutter/clutter-actor.c
(clutter_actor_get_abs_allocation_vertices): The initialization of
the local stage pointer got moved away in revision 3081 so it was
crashing if the function is called before the layout is run.
2008-07-02 Emmanuele Bassi <ebassi@openedhand.com> 2008-07-02 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-label.c: * clutter/clutter-label.c:

View File

@ -1265,7 +1265,6 @@ clutter_actor_get_abs_allocation_vertices (ClutterActor *self,
ClutterVertex verts[4]) ClutterVertex verts[4])
{ {
ClutterActorPrivate *priv; ClutterActorPrivate *priv;
ClutterActor *stage;
g_return_if_fail (CLUTTER_IS_ACTOR (self)); g_return_if_fail (CLUTTER_IS_ACTOR (self));
@ -1276,7 +1275,17 @@ clutter_actor_get_abs_allocation_vertices (ClutterActor *self,
* clutter_actor_transform_and_project_box() * clutter_actor_transform_and_project_box()
*/ */
if (priv->needs_allocation) if (priv->needs_allocation)
_clutter_stage_maybe_relayout (stage); {
ClutterActor *stage = clutter_actor_get_stage (self);
/* FIXME: if were not yet added to a stage, its probably unsafe to
* return default - idealy the func should fail.
*/
if (stage == NULL)
stage = clutter_stage_get_default ();
_clutter_stage_maybe_relayout (stage);
}
clutter_actor_transform_and_project_box (self, clutter_actor_transform_and_project_box (self,
&self->priv->allocation, &self->priv->allocation,