Fixed the segmentation fault on mouse movement when the serial mouse is attached to a disabled serial port.
This commit is contained in:
@@ -223,7 +223,7 @@ serial_write_fifo(serial_t *dev, uint8_t dat)
|
|||||||
((dev->type >= SERIAL_16550) && dev->fifo_enabled) ?
|
((dev->type >= SERIAL_16550) && dev->fifo_enabled) ?
|
||||||
fifo_get_count(dev->rcvr_fifo) : 0);
|
fifo_get_count(dev->rcvr_fifo) : 0);
|
||||||
|
|
||||||
if (!(dev->mctrl & 0x10))
|
if ((dev != NULL) && !(dev->mctrl & 0x10))
|
||||||
write_fifo(dev, dat);
|
write_fifo(dev, dat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user