diff options
Diffstat (limited to 'engines/wintermute')
-rw-r--r-- | engines/wintermute/base/base_script_holder.cpp | 3 |
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);
|