From: Ricardo Cruz Date: Thu, 19 Aug 2004 11:00:53 +0000 (+0000) Subject: Added message when no action is found. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=08b7ca0cfedba1e9fa904162fa79d3a00d2188f7;p=supertux.git Added message when no action is found. SVN-Revision: 1815 --- diff --git a/lib/special/sprite.cpp b/lib/special/sprite.cpp index 0e5fddf17..6659c48cd 100644 --- a/lib/special/sprite.cpp +++ b/lib/special/sprite.cpp @@ -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; }