diff --git a/balls.c b/balls.c index 5c908b7..4d75d45 100644 --- a/balls.c +++ b/balls.c @@ -183,6 +183,7 @@ static struct ball_face * new_ball_face(unsigned int radius, cairo_surface_t * f cairo_set_source (ball_cr, pat); cairo_arc (ball_cr, 0.0, 0.0, radius, 0, 2 * M_PI); cairo_fill (ball_cr); + cairo_pattern_destroy (pat); } cairo_surface_flush(f->c_faces[i]); cairo_destroy(ball_cr); diff --git a/gravity.c b/gravity.c index 1590cdf..9658c97 100644 --- a/gravity.c +++ b/gravity.c @@ -20,7 +20,7 @@ void gravity_constant_field (double x, double y) { g_x = x; g_y = y; } - + void gravity_newton_field (double r, double g) { constant_field = 0; g_r = r;