* Peek in X and Y direction at the same time.
[supertux.git] / src / game_session.cpp
index a0e48c3..e918a09 100644 (file)
@@ -528,7 +528,7 @@ GameSession::update(float elapsed_time)
   }
 
   // update sounds
-  sound_manager->set_listener_position(currentsector->player->get_pos());
+  if (currentsector && currentsector->camera) sound_manager->set_listener_position(currentsector->camera->get_center());
 
   /* Handle music: */
   if (end_sequence)