aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/wintermute/base/base_script_holder.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/wintermute/base/base_script_holder.cpp b/engines/wintermute/base/base_script_holder.cpp
index 19bd82f2b0..b40647dc7b 100644
--- a/engines/wintermute/base/base_script_holder.cpp
+++ b/engines/wintermute/base/base_script_holder.cpp
@@ -287,9 +287,10 @@ bool BaseScriptHolder::persist(BasePersistenceManager *persistMgr) {
const char *name = getName();
persistMgr->transfer(TMEMBER(name));
} else {
- const char *name;
+ char *name;
persistMgr->transfer(TMEMBER(name));
setName(name);
+ delete[] name;
}
_scripts.persist(persistMgr);