racing:: fixed a potential crash if goal not found

This commit is contained in:
?
2019-09-12 22:38:42 +02:00
committed by Zeno Rogue
parent c5e87f1d2d
commit c797d4ccba
+4
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