Added message when no action is found.
authorRicardo Cruz <rick2@aeiou.pt>
Thu, 19 Aug 2004 11:00:53 +0000 (11:00 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Thu, 19 Aug 2004 11:00:53 +0000 (11:00 +0000)
SVN-Revision: 1815

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;
 }