diff options
| author | Alexander Gavrilov | 2012-09-05 21:27:42 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-09-05 21:27:42 +0400 |
| commit | 8d876cc7d92faf1616d914e03c890772256ebb83 (patch) | |
| tree | 86a87e2dc8a586a0d12f51966d065b9f5ae92de1 /library/modules | |
| parent | 57086ac56eb489abd0c7759aed084020edc71148 (diff) | |
| download | dfhack-8d876cc7d92faf1616d914e03c890772256ebb83.tar.gz dfhack-8d876cc7d92faf1616d914e03c890772256ebb83.tar.bz2 dfhack-8d876cc7d92faf1616d914e03c890772256ebb83.tar.xz | |
Support renaming some buildings, and arbitrary units, via gui script.
Diffstat (limited to 'library/modules')
| -rw-r--r-- | library/modules/World.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/modules/World.cpp b/library/modules/World.cpp index 393e7cbf..e14aa02a 100644 --- a/library/modules/World.cpp +++ b/library/modules/World.cpp @@ -285,13 +285,13 @@ PersistentDataItem World::GetPersistentData(int entry_id) PersistentDataItem World::GetPersistentData(const std::string &key, bool *added) { - *added = false; + if (added) *added = false; PersistentDataItem rv = GetPersistentData(key); if (!rv.isValid()) { - *added = true; + if (added) *added = true; rv = AddPersistentData(key); } |
