1
0
mirror of https://github.com/simh/simh.git synced 2026-02-06 08:25:53 +00:00

VIDEO: Not all events come with a valid windowID.

This commit is contained in:
Lars Brinkhoff
2022-10-17 08:35:24 +02:00
committed by Mark Pizzolato
parent c9bfb77396
commit fb20442ffd

View File

@@ -2076,12 +2076,14 @@ while (vid_active) {
event.user.code = 0; /* Mark as done */
continue;
}
vptr = vid_get_event_window (&event, event.user.windowID);
if (vptr == NULL) {
sim_debug (SIM_VID_DBG_VIDEO, vptr->vid_dev, "vid_thread() - Ignored event not bound to a window\n");
event.user.code = 0; /* Mark as done */
break;
if (event.user.code != EVENT_OPEN) {
vptr = vid_get_event_window (&event, event.user.windowID);
if (vptr == NULL) {
sim_debug (SIM_VID_DBG_VIDEO, vptr->vid_dev, "vid_thread() - Ignored event not bound to a window\n");
event.user.code = 0; /* Mark as done */
break;
}
}
if (event.user.code == EVENT_REDRAW) {
vid_update (vptr);
event.user.code = 0; /* Mark as done */