From 147b63b7be6671d3a7d9ee3a8b7b2f070aaf3481 Mon Sep 17 00:00:00 2001 From: Zheng Da <zhengda1936@gmail.com> Date: Sat, 5 Jun 2010 05:05:19 +0200 Subject: skip calling init if there is no init. --- libmachdev/ds_routines.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libmachdev') diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c index 65cefa3a..df9146a0 100644 --- a/libmachdev/ds_routines.c +++ b/libmachdev/ds_routines.c @@ -430,7 +430,8 @@ void mach_device_init() dev_class = ports_create_class (0, 0); for (i = 0; i < NUM_EMULATION; i++) { - emulation_list[i]->init(); + if (emulation_list[i]->init) + emulation_list[i]->init(); } } -- cgit v1.2.3