From 3ee3c471caec386cb1e7ab736cfa1d5405c4c56b Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 26 Feb 2020 22:29:58 +0100 Subject: [PATCH] fixed a possible crash while drawing ClosedGates --- celldrawer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/celldrawer.cpp b/celldrawer.cpp index cbaac82b..ff5c2a84 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -674,7 +674,7 @@ void celldrawer::draw_wall() { if(c->wall == waClosedGate) { int hdir = 0; - for(int i=0; itype; i++) if(c->move(i)->wall == waClosedGate) + for(int i=0; itype; i++) if(c->move(i) && c->move(i)->wall == waClosedGate) hdir = i; transmatrix V2 = mscale(V, wmspatial?cgi.WALL:1) * ddspin(c, hdir, M_PI); queuepolyat(V2, cgi.shPalaceGate, darkena(wcol, 0, 0xFF), wmspatial?PPR::WALL3A:PPR::WALL);