X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0c133e13b36a923c65f94499554e432bc3a0daa..70544c1e6c2c52722a8215ed12724a75a284be08:/src/cocoa/display.mm diff --git a/src/cocoa/display.mm b/src/cocoa/display.mm index b9135addd5..af4c6266c4 100644 --- a/src/cocoa/display.mm +++ b/src/cocoa/display.mm @@ -76,12 +76,8 @@ protected: unsigned wxDisplayFactoryMacOSX::GetCount() { CGDisplayCount count; -#ifdef __WXDEBUG__ - CGDisplayErr err = -#endif - CGGetActiveDisplayList(0, NULL, &count); - - wxASSERT(err == CGDisplayNoErr); + CGDisplayErr err = CGGetActiveDisplayList(0, NULL, &count); + wxCHECK_MSG( err != CGDisplayNoErr, 0, "CGGetActiveDisplayList() failed" ); return count; } @@ -126,12 +122,9 @@ wxDisplayImpl *wxDisplayFactoryMacOSX::CreateDisplay(unsigned n) CGDisplayCount theCount = GetCount(); CGDirectDisplayID* theIDs = new CGDirectDisplayID[theCount]; -#ifdef __WXDEBUG__ - CGDisplayErr err = -#endif - CGGetActiveDisplayList(theCount, theIDs, &theCount); + CGDisplayErr err = CGGetActiveDisplayList(theCount, theIDs, &theCount); + wxCHECK_MSG( err != CGDisplayNoErr, NULL, "CGGetActiveDisplayList() failed" ); - wxASSERT( err == CGDisplayNoErr ); wxASSERT( n < theCount ); wxDisplayImplMacOSX *display = new wxDisplayImplMacOSX(n, theIDs[n]);