X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fapple2-main.c;h=ef21995b2ce9cf85db2ab808f8a0aa9fff79cddf;hp=0e1508ff1ad514e1a0ca064ab9f58df78634df81;hb=4ade52359b6eba3621566dac79793a33aa4c915f;hpb=ff35d056d723c9a5ffe728dbba5f1c25e141be04 diff --git a/hacks/apple2-main.c b/hacks/apple2-main.c index 0e1508ff..ef21995b 100644 --- a/hacks/apple2-main.c +++ b/hacks/apple2-main.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1998-2012 Jamie Zawinski +/* xscreensaver, Copyright (c) 1998-2013 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -1778,7 +1778,8 @@ apple2_reshape (Display *dpy, Window window, void *closure, unsigned int w, unsigned int h) { struct state *st = (struct state *) closure; - analogtv_reconfigure (st->sim->dec); + if (st->sim) + analogtv_reconfigure (st->sim->dec); } static Bool @@ -1786,7 +1787,8 @@ apple2_event (Display *dpy, Window window, void *closure, XEvent *event) { struct state *st = (struct state *) closure; - if (st->controller == terminal_controller && + if (st->sim && + st->controller == terminal_controller && event->xany.type == KeyPress) { terminal_keypress_handler (dpy, event, st->sim->controller_data); return True;