summaryrefslogtreecommitdiff
path: root/src/map/itemdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/itemdb.cpp')
-rw-r--r--src/map/itemdb.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/map/itemdb.cpp b/src/map/itemdb.cpp
index f60dc53..147db91 100644
--- a/src/map/itemdb.cpp
+++ b/src/map/itemdb.cpp
@@ -367,10 +367,8 @@ int itemdb_read_noequip(void)
static
void itemdb_final(struct item_data *id)
{
- if (id->use_script)
- free(const_cast<ScriptCode *>(id->use_script));
- if (id->equip_script)
- free(const_cast<ScriptCode *>(id->equip_script));
+ id->use_script.reset();
+ id->equip_script.reset();
}
void itemdb_reload(void)