From 8d724d1a29a14ef6e8ffaf39a642cd588808d54f Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Sat, 14 Feb 2015 17:47:40 +0100 Subject: [PATCH] Fix for coverity #29370 --- src/worldmap/worldmap.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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"); -- 2.11.0