arch_debug_console_init() is called with args == NULL in case of an early

boot message - unfortunately, it crashed when used this way until now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14399 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-10-17 10:15:42 +00:00
parent 19567a9917
commit 76a377394e
@@ -227,7 +227,7 @@ arch_debug_console_init(kernel_args *args)
uint16 divisor = (uint16)(115200 / kSerialBaudRate);
// only use the port if we could find one, else use the standard port
if (args->platform_args.serial_base_ports[0] != 0)
if (args != NULL && args->platform_args.serial_base_ports[0] != 0)
sSerialBasePort = args->platform_args.serial_base_ports[0];
out8(0x80, sSerialBasePort + SERIAL_LINE_CONTROL); /* set divisor latch access bit */