diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-23 13:37:39 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-23 13:38:31 -0600 |
commit | a0261e132ed573fbad881f21a60102b829f8a099 (patch) | |
tree | 50cbd76dc9435541e0adfde224b5c6bee315530d /crawl-ref/source/map_knowledge.h | |
parent | 124c70fd32097f9273dab9cf38c482d424a55b75 (diff) | |
download | crawl-ref-a0261e132ed573fbad881f21a60102b829f8a099.tar.gz crawl-ref-a0261e132ed573fbad881f21a60102b829f8a099.zip |
Paper over a crash (#8587).
This gets the game to load, but the underlying issue is still at large.
Diffstat (limited to 'crawl-ref/source/map_knowledge.h')
-rw-r--r-- | crawl-ref/source/map_knowledge.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crawl-ref/source/map_knowledge.h b/crawl-ref/source/map_knowledge.h index 75ca771302..cf613d2513 100644 --- a/crawl-ref/source/map_knowledge.h +++ b/crawl-ref/source/map_knowledge.h @@ -151,7 +151,14 @@ struct map_cell bool detected_item() const { - return !!(flags & MAP_DETECTED_ITEM); + const bool ret = !!(flags & MAP_DETECTED_ITEM); + // TODO: change to an ASSERT when the underlying crash goes away + if (ret && !_item) + { + //clear_item(); + return false; + } + return ret; } void set_item(const item_info& ii, bool more_items) |