diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-11-03 15:20:57 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-11-03 15:20:57 +0100 |
commit | 8b79ad59f14c4ced6ae2af6277d94b3265bd211d (patch) | |
tree | 3d1cc28172f2f83e9f549fb7b5d63b3e4200cb99 /sys/src/games/turtle.c | |
parent | 528936156f02103a1b884d82d003f3cf4089923d (diff) |
games/turtle: do exit instead of crash in redraw() when there where no lines drawn
Diffstat (limited to 'sys/src/games/turtle.c')
-rw-r--r-- | sys/src/games/turtle.c | 2 |
1 files changed, 2 insertions, 0 deletions
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"); |