Fix for get_card_device() (no whatsnew)

This commit is contained in:
Miodrag Milanovic 2012-01-25 07:49:13 +00:00
parent 8e3f4a3056
commit fb6f3baacb

View File

@ -37,11 +37,11 @@ device_t* device_slot_interface::get_card_device()
} else { } else {
subtag = device().mconfig().options().value(device().tag()); subtag = device().mconfig().options().value(device().tag());
} }
if (subtag) { if (subtag && strlen(subtag)>0) {
device_slot_card_interface *intf = NULL; device_slot_card_interface *intf = NULL;
dev = device().subdevice(subtag); dev = device().subdevice(subtag);
if (dev!=NULL && !dev->interface(intf)) if (dev!=NULL && !dev->interface(intf))
throw emu_fatalerror("get_card_device called for device '%s' with no slot card interface", dev->tag()); throw emu_fatalerror("get_card_device called for device '%s' with no slot card interface tag %s", dev->tag(),subtag);
} }
return dev; return dev;
} }