Added message when no action is found.
[supertux.git] / lib / special / sprite.cpp
index 0e5fddf..6659c48 100644 (file)
@@ -104,6 +104,11 @@ if(!next_action.empty() && animation_loops > 0)
   return;
   }
 Actions::iterator i = actions.find(act);
+if(i == actions.end())
+  {
+  std::cerr << "Warning: Action '" << act << "' not found on Sprite '" << name << "'\n";
+  return;
+  }
 action = i->second;
 }