* clutter/clutter-actor.c: (clutter_actor_transform_stage_point):

Check that x_out and y_out != NULL before setting their contents
This commit is contained in:
Chris Lord 2008-02-04 15:11:29 +00:00
parent 5eb9bbc1f3
commit 3878e6730a
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2008-02-04 Chris Lord <chris@openedhand.com>
* clutter/clutter-actor.c: (clutter_actor_transform_stage_point):
Check that x_out and y_out != NULL before setting their contents
2008-02-04 Øyvind Kolås <pippin@o-hand.com>
* clutter/clutter-timeline.c: (clutter_timeline_rewind): updated

View File

@ -4862,10 +4862,12 @@ clutter_actor_transform_stage_point (ClutterActor *self,
wf = xi*ST[0][2] + yi*ST[1][2] + ST[2][2];
/*
* The division needs to be done in floating point for precission reasons.
* The division needs to be done in floating point for precision reasons.
*/
*x_out = CLUTTER_UNITS_FROM_FLOAT (FX2FP (xf) / FX2FP (wf));
*y_out = CLUTTER_UNITS_FROM_FLOAT (FX2FP (yf) / FX2FP (wf));
if (x_out)
*x_out = CLUTTER_UNITS_FROM_FLOAT (FX2FP (xf) / FX2FP (wf));
if (y_out)
*y_out = CLUTTER_UNITS_FROM_FLOAT (FX2FP (yf) / FX2FP (wf));
#undef FP2FX
#undef FX2FP