1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-30 15:39:54 +00:00

fixed a possible crash while drawing ClosedGates

This commit is contained in:
Zeno Rogue 2020-02-26 22:29:58 +01:00
parent 0de0714ba5
commit 3ee3c471ca

View File

@ -674,7 +674,7 @@ void celldrawer::draw_wall() {
if(c->wall == waClosedGate) { if(c->wall == waClosedGate) {
int hdir = 0; int hdir = 0;
for(int i=0; i<c->type; i++) if(c->move(i)->wall == waClosedGate) for(int i=0; i<c->type; i++) if(c->move(i) && c->move(i)->wall == waClosedGate)
hdir = i; hdir = i;
transmatrix V2 = mscale(V, wmspatial?cgi.WALL:1) * ddspin(c, hdir, M_PI); 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); queuepolyat(V2, cgi.shPalaceGate, darkena(wcol, 0, 0xFF), wmspatial?PPR::WALL3A:PPR::WALL);