Make sure screen is not nil before pollevent

Ref #728
Ref #727
This commit is contained in:
Zachary Yedidia
2017-07-10 18:04:11 -04:00
parent 030a05c103
commit 63b4848bb0

View File

@@ -408,7 +408,9 @@ func main() {
// Here is the event loop which runs in a separate thread
go func() {
for {
events <- screen.PollEvent()
if screen != nil {
events <- screen.PollEvent()
}
}
}()