Check to make sure worldmap level sprite has a 'perfect' action before trying to...
authorLMH <lmh.0013@gmail.com>
Sun, 15 Sep 2013 09:07:09 +0000 (23:07 -1000)
committerTobias Markus <tobbi@mozilla-uk.org>
Sat, 26 Oct 2013 16:45:23 +0000 (18:45 +0200)
src/worldmap/worldmap.cpp

index 09bb8b5..339e4e7 100644 (file)
@@ -482,7 +482,8 @@ WorldMap::finished_level(Level* gamelevel)
   get_level_target_time(*level);
   if(level->statistics.completed(level->statistics, level->target_time)) {
     level->perfect = true;
-    level->sprite->set_action("perfect");
+    if(level->sprite->has_action("perfect"))
+      level->sprite->set_action("perfect");
   }
 
   save_state();