From: Tobias Markus Date: Sat, 14 Feb 2015 16:47:40 +0000 (+0100) Subject: Fix for coverity #29370 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8d724d1a29a14ef6e8ffaf39a642cd588808d54f;p=supertux.git Fix for coverity #29370 --- diff --git a/src/worldmap/worldmap.cpp b/src/worldmap/worldmap.cpp index e5fba0392..4aa05c736 100644 --- a/src/worldmap/worldmap.cpp +++ b/src/worldmap/worldmap.cpp @@ -481,6 +481,10 @@ WorldMap::finished_level(Level* gamelevel) // TODO use Level* parameter here? LevelTile* level = at_level(); + if(level == NULL) { + return; + } + bool old_level_state = level->solved; level->solved = true; level->sprite->set_action("solved");