games/turtle: do exit instead of crash in redraw() when there where no lines drawn
This commit is contained in:
parent
528936156f
commit
8b79ad59f1
1 changed files with 2 additions and 0 deletions
|
@ -169,6 +169,8 @@ main()
|
||||||
if(s == nil) break;
|
if(s == nil) break;
|
||||||
runline(s);
|
runline(s);
|
||||||
}
|
}
|
||||||
|
if(lines == nil)
|
||||||
|
exits(nil);
|
||||||
|
|
||||||
if(initdraw(nil, nil, nil) < 0)
|
if(initdraw(nil, nil, nil) < 0)
|
||||||
sysfatal("initdraw: %r");
|
sysfatal("initdraw: %r");
|
||||||
|
|
Loading…
Reference in a new issue