This fixes a problem that's been hidden for a while.
DAC960_open() will try to dereference a NULL pointer if an application
opens (for example) /dev/rd/c0d12 when there has never been a logical
device created for that file.
} else {
DAC960_V2_LogicalDeviceInfo_T *i =
p->V2.LogicalDeviceInformation[drive_nr];
- if (i->LogicalDeviceState == DAC960_V2_LogicalDevice_Offline)
+ if (!i || i->LogicalDeviceState == DAC960_V2_LogicalDevice_Offline)
return -ENXIO;
}