aboutsummaryrefslogtreecommitdiff
path: root/src/itemdef.cpp
diff options
context:
space:
mode:
authorWeblate <42@minetest.ru>2013-05-13 18:19:51 +0200
committerWeblate <42@minetest.ru>2013-05-13 18:19:51 +0200
commite0564d5de01dd26f7b4f4d188415f5cf5a47b5d0 (patch)
tree79a5a18634069822b84b9c878d8d26742567c4a3 /src/itemdef.cpp
parentbe96fa2fb884fca571b92f63d33e0c5a592a2aad (diff)
parent822723c2468ea763cdef447218059a5586e8e033 (diff)
downloadminetest-e0564d5de01dd26f7b4f4d188415f5cf5a47b5d0.tar.gz
minetest-e0564d5de01dd26f7b4f4d188415f5cf5a47b5d0.tar.bz2
minetest-e0564d5de01dd26f7b4f4d188415f5cf5a47b5d0.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/itemdef.cpp')
-rw-r--r--src/itemdef.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/itemdef.cpp b/src/itemdef.cpp
index 05328ea48..d660db77f 100644
--- a/src/itemdef.cpp
+++ b/src/itemdef.cpp
@@ -226,17 +226,11 @@ class CItemDefManager: public IWritableItemDefManager
public:
CItemDefManager()
{
- for (std::map<std::string, ItemDefinition*>::iterator iter =
- m_item_definitions.begin(); iter != m_item_definitions.end();
- iter ++) {
- delete iter->second;
- }
- m_item_definitions.clear();
+
#ifndef SERVER
m_main_thread = get_current_thread_id();
m_driver = NULL;
#endif
-
clear();
}
virtual ~CItemDefManager()
@@ -260,6 +254,12 @@ public:
}
m_driver = NULL;
#endif
+ for (std::map<std::string, ItemDefinition*>::iterator iter =
+ m_item_definitions.begin(); iter != m_item_definitions.end();
+ iter ++) {
+ delete iter->second;
+ }
+ m_item_definitions.clear();
}
virtual const ItemDefinition& get(const std::string &name_) const
{