From 114f3c023be94b4bdaedfa16fd6c2b019fda13d9 Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Sun, 15 Feb 2015 19:16:10 +0100 Subject: [PATCH 1/1] Fix for coverity #29386 --- src/supertux/game_session.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/supertux/game_session.cpp b/src/supertux/game_session.cpp index d64995b06..57e48e455 100644 --- a/src/supertux/game_session.cpp +++ b/src/supertux/game_session.cpp @@ -480,8 +480,11 @@ GameSession::update(float elapsed_time) } } + if(currentsector == NULL) + return; + // update sounds - if (currentsector && currentsector->camera) SoundManager::current()->set_listener_position(currentsector->camera->get_center()); + if (currentsector->camera) SoundManager::current()->set_listener_position(currentsector->camera->get_center()); /* Handle music: */ if (end_sequence) -- 2.11.0