Save SavedKbd before resetting the queues, fixes the segmentation fault.

This commit is contained in:
OBattler
2023-04-10 19:18:39 +02:00
parent 767e1a9a25
commit 5da3e78fc1

View File

@@ -2934,6 +2934,9 @@ kbd_init(const device_t *info)
dev->flags = info->local;
dev->pci = !!(info->flags & DEVICE_PCI);
/* We need this, sadly. */
SavedKbd = dev;
video_reset(gfxcard[0]);
kbd_reset(dev);
@@ -2983,9 +2986,6 @@ kbd_init(const device_t *info)
break;
}
/* We need this, sadly. */
SavedKbd = dev;
return (dev);
}