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:
Gilles Depeyrot
2001-10-31 22:23:58 +00:00
parent a3df447d8b
commit ff8fda3617
5 changed files with 38 additions and 14 deletions

View File

@@ -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)