Fixed the segmentation fault on mouse movement when the serial mouse is attached to a disabled serial port.

This commit is contained in:
OBattler
2024-08-30 23:20:22 +02:00
parent e03ba4cd99
commit 2207367bdd

View File

@@ -223,7 +223,7 @@ serial_write_fifo(serial_t *dev, uint8_t dat)
((dev->type >= SERIAL_16550) && dev->fifo_enabled) ?
fifo_get_count(dev->rcvr_fifo) : 0);
if (!(dev->mctrl & 0x10))
if ((dev != NULL) && !(dev->mctrl & 0x10))
write_fifo(dev, dat);
}