games/turtle: do exit instead of crash in redraw() when there where no lines drawn

front
cinap_lenrek 2019-11-03 15:20:57 +01:00
parent 528936156f
commit 8b79ad59f1
1 changed files with 2 additions and 0 deletions

View File

@ -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");