Skip to content

Commit

Permalink
Fixed: Build error (QMap operator [])
Browse files Browse the repository at this point in the history
Let's see if the value() method works better; it also has an explicit
default value.
  • Loading branch information
skyjake committed Mar 5, 2013
1 parent cc5b483 commit 7147520
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doomsday/client/include/resource/material.h
Expand Up @@ -854,7 +854,10 @@ class Material : public de::MapElement
*/
inline Animation *animation(MaterialContextId context) const
{
return animations()[context];
Animations const &anims = animations();
Animations::const_iterator found = anims.constFind(context);
if(found == anims.constEnd()) return 0;
return found.value();
}

/**
Expand Down

0 comments on commit 7147520

Please sign in to comment.