]> git.lizzy.rs Git - plan9front.git/commitdiff
games/galaxy: fix crash on write to closed display
authorspew <devnull@localhost>
Sun, 19 Feb 2017 16:02:56 +0000 (10:02 -0600)
committerspew <devnull@localhost>
Sun, 19 Feb 2017 16:02:56 +0000 (10:02 -0600)
sys/src/games/galaxy/galaxy.c

index 3b5d5d76830dbcb417d11176e212f0df236e3ef4..c8be68d621f4209e66ae3a6a83fecd1602ca3e77 100644 (file)
@@ -464,14 +464,12 @@ kbdthread(void*)
        for(;;) {
                recv(realkc->c, &r);
                if(r == Kdel) {
-                       closedisplay(display);
                        threadexitsall(nil);
                }
                if(kc.c != nil)
                        send(kc.c, &r);
                else switch(r) {
                case 'q':
-                       closedisplay(display);
                        threadexitsall(nil);
                        break;
                case 's':