diff options
Diffstat (limited to 'crawl-ref/source/command.cc')
-rw-r--r-- | crawl-ref/source/command.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index 36e95113f4..54628dc57a 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -27,6 +27,7 @@ REVISION("$Rev$"); #include "decks.h" #include "describe.h" #include "files.h" +#include "ghost.h" #include "initfile.h" #include "invent.h" #include "itemname.h" @@ -1335,7 +1336,11 @@ static bool _do_description(std::string key, std::string type, else { monster_type mon_num = get_monster_by_name(key, true); - if (mon_num != MONS_PROGRAM_BUG) + // Don't attempt to get more information on ghosts or + // pandemonium demons as the ghost struct has not been initialized + // which will cause a crash. + if (mon_num != MONS_PROGRAM_BUG && mon_num != MONS_PLAYER_GHOST + && mon_num != MONS_PANDEMONIUM_DEMON) { monsters mon; mon.type = mon_num; |