From 8b79ad59f14c4ced6ae2af6277d94b3265bd211d Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 3 Nov 2019 15:20:57 +0100 Subject: [PATCH] games/turtle: do exit instead of crash in redraw() when there where no lines drawn --- sys/src/games/turtle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/src/games/turtle.c b/sys/src/games/turtle.c index 55d6c54c5..816a34dc3 100644 --- a/sys/src/games/turtle.c +++ b/sys/src/games/turtle.c @@ -169,6 +169,8 @@ main() if(s == nil) break; runline(s); } + if(lines == nil) + exits(nil); if(initdraw(nil, nil, nil) < 0) sysfatal("initdraw: %r");