From afecd8bc7430a946c2cc47ec9b45cbd0de93499b Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 25 Oct 2007 17:11:44 +0000 Subject: Fixed wizmode segfault on &^ with no god. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2575 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/religion.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/religion.cc') diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 00aeed4a4b..63ad249a3f 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -686,6 +686,8 @@ static void give_nemelex_gift() static void do_god_gift(bool prayed_for) { + ASSERT(you.religion != GOD_NO_GOD); + // Zin worshippers are the only ones that can pray to ask Zin for stuff. if (prayed_for != (you.religion == GOD_ZIN)) return; @@ -1670,7 +1672,7 @@ bool did_god_conduct( conduct_type thing_done, int level, const actor *victim ) void gain_piety(int pgn) { // Xom uses piety differently... - if (you.religion == GOD_XOM) + if (you.religion == GOD_XOM || you.religion == GOD_NO_GOD) return; // check to see if we owe anything first -- cgit v1.2.3-54-g00ecf