summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-01 15:34:21 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-01 15:34:21 +0000
commitd813da0afb4ebeea2c25dbdae36060eee5424d45 (patch)
treecf89e28064ddcd3ebbfdceeb52c2148195b25303 /crawl-ref/source/describe.cc
parent057f3edf4f9795595f296d2beb7ed5fa4d8f04c0 (diff)
downloadcrawl-ref-d813da0afb4ebeea2c25dbdae36060eee5424d45.tar.gz
crawl-ref-d813da0afb4ebeea2c25dbdae36060eee5424d45.zip
Apply r9873 to trunk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9874 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 9437a4c4c8..796b75b7e1 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -34,6 +34,7 @@ REVISION("$Rev$");
#include "it_use2.h"
#include "itemname.h"
#include "itemprop.h"
+#include "items.h"
#include "macro.h"
#include "mapmark.h"
#include "menu.h"
@@ -2285,6 +2286,9 @@ static bool _describe_spells(const item_def &item)
//---------------------------------------------------------------
void describe_item( item_def &item, bool allow_inscribe )
{
+ if (!is_valid_item(item))
+ return;
+
while (true)
{
const bool spells_shown = _show_item_description(item);