racing:: fixed a potential crash if goal not found

This commit is contained in:
? 2019-02-27 18:01:10 +01:00 committed by Zeno Rogue
parent c5e87f1d2d
commit c797d4ccba
1 changed files with 4 additions and 0 deletions

View File

@ -1294,8 +1294,12 @@ void markers() {
using namespace racing;
cell *goal = NULL;
for(cell *c: track) if(inscreenrange(c)) goal = c;
if(!goal) return;
hyperpoint H = tC0(ggmatrix(goal));
if(invalid_point(H)) return;
queuechr(H, 2*vid.fsize, 'X', 0x10100 * int(128 + 100 * sintick(150)));
queuestr(H, vid.fsize,
#if CAP_CRYSTAL