From: Tobias Markus Date: Sun, 15 Feb 2015 18:16:10 +0000 (+0100) Subject: Fix for coverity #29386 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=114f3c023be94b4bdaedfa16fd6c2b019fda13d9;p=supertux.git Fix for coverity #29386 --- 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)