Found the reason for crash on bootup. I added a NULL check in the getMultipleDisplays my suspicion is that getMatchingServices() reutrns NULL on boot up.
OSDictionary* dict = OSDictionary::withCapacity(1); dict->setObject(kIOProviderClassKey, OSString::withCStringNoCopy("IODisplayConnect")); OSIterator* ioDisplayConnectIterator = getMatchingServices(dict); + if (ioDisplayConnectIterator == NULL) { + return false; + } unsigned int displayCount = 0; OSObject* obj;
Found the reason for crash on bootup. I added a NULL check in the getMultipleDisplays my suspicion is that getMatchingServ ices() reutrns NULL on boot up.
OSDictionary* dict = OSDictionary: :withCapacity( 1); >setObject( kIOProviderClas sKey, OSString: :withCStringNoC opy("IODisplayC onnect" )); tIterator = getMatchingServ ices(dict) ; ctIterator == NULL) {
dict-
OSIterator* ioDisplayConnec
+ if (ioDisplayConne
+ return false;
+ }
unsigned int displayCount = 0;
OSObject* obj;