corrected access to NULL parameters in wxGetOsVersion
replaced wxMACINTOSH with wxMAC and wxMAC_DARWIN to differentiate return value of wxGetOsVersion according to whether Mac paths or Unix paths are used git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -190,11 +190,22 @@ void wxBell()
|
||||
|
||||
int wxGetOsVersion(int *majorVsn, int *minorVsn)
|
||||
{
|
||||
long theSystem ;
|
||||
Gestalt(gestaltSystemVersion, &theSystem) ;
|
||||
*minorVsn = (theSystem & 0xFF ) ;
|
||||
*majorVsn = (theSystem >> 8 ) ; // are there x-platform conventions ?
|
||||
return wxMACINTOSH;
|
||||
long theSystem ;
|
||||
|
||||
// are there x-platform conventions ?
|
||||
|
||||
Gestalt(gestaltSystemVersion, &theSystem) ;
|
||||
if (minorVsn != NULL) {
|
||||
*minorVsn = (theSystem & 0xFF ) ;
|
||||
}
|
||||
if (majorVsn != NULL) {
|
||||
*majorVsn = (theSystem >> 8 ) ;
|
||||
}
|
||||
#ifdef __DARWIN__
|
||||
return wxMAC_DARWIN;
|
||||
#else
|
||||
return wxMAC;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Reading and writing resources (eg WIN.INI, .Xdefaults)
|
||||
|
Reference in New Issue
Block a user