summaryrefslogtreecommitdiff
path: root/src/resources/db/itemdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/db/itemdb.cpp')
-rw-r--r--src/resources/db/itemdb.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index e5b13f9bb..e6e3cc323 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -988,12 +988,11 @@ static void loadSoundRef(ItemInfo *const itemInfo, XmlNodeConstPtr node)
return;
}
const std::string event = XML::getProperty(node, "event", "");
- const int delay = XML::getProperty(node, "delay", 0);
-
const std::map<std::string, ItemSoundEvent::Type>::const_iterator
it = mSoundNames.find(event);
if (it != mSoundNames.end())
{
+ const int delay = XML::getProperty(node, "delay", 0);
const std::string filename = XmlChildContent(node);
itemInfo->addSound((*it).second, filename, delay);
}