diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-27 04:08:05 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-27 04:08:05 -0800 |
commit | 58e8489c81d0e62a5b688ecba115c290d0835ca3 (patch) | |
tree | 02dba9958df23695ee21d644d995df1be40c7e6c /crawl-ref/source/shopping.cc | |
parent | ec60900d973de379c00930908bce3ae08a29ecda (diff) | |
download | crawl-ref-58e8489c81d0e62a5b688ecba115c290d0835ca3.tar.gz crawl-ref-58e8489c81d0e62a5b688ecba115c290d0835ca3.zip |
Fix shopping list crashing during map_stat_gen
Diffstat (limited to 'crawl-ref/source/shopping.cc')
-rw-r--r-- | crawl-ref/source/shopping.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index b42432c843..56974b78fe 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -2391,6 +2391,10 @@ int ShoppingList::size() const void ShoppingList::move_things(const coord_def &_src, const coord_def &_dst) { + if (crawl_state.map_stat_gen) + // Shopping list is unitialized and uneeded. + return; + const level_pos src(level_id::current(), _src); const level_pos dst(level_id::current(), _dst); @@ -2405,6 +2409,10 @@ void ShoppingList::move_things(const coord_def &_src, const coord_def &_dst) void ShoppingList::forget_pos(const level_pos &pos) { + if (crawl_state.map_stat_gen) + // Shopping list is unitialized and uneeded. + return; + for (unsigned int i = 0; i < list->size(); i++) { const CrawlHashTable &thing = (*list)[i]; |