diff --git a/src/engine.c b/src/engine.c
index 03ccedc5024d973338af8a3224eb6c3342b9efb9..90820b7e3ad7da1b293a5afdd4a7ce554cf1b147 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -4584,7 +4584,7 @@ void engine_makeproxies(struct engine *e) {
   const int with_hydro = (e->policy & engine_policy_hydro);
   const int with_gravity = (e->policy & engine_policy_self_gravity);
   double CoM_i[3] = {0., 0., 0.};
-  double r_max_i;
+  double r_max_i = 0.;
 
   /* Prepare the proxies and the proxy index. */
   if (e->proxy_ind == NULL)