Added missing use of NSAutoreleasePool object in calc_mac_os_version().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9688 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
74496aa2cc
commit
91a300f6b6
@ -3460,9 +3460,11 @@ void *Fl_X::get_carbon_function(const char *function_name) {
|
||||
*/
|
||||
static int calc_mac_os_version() {
|
||||
int M, m, b = 0;
|
||||
NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init];
|
||||
NSDictionary * sv = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
|
||||
const char *s = [[sv objectForKey:@"ProductVersion"] UTF8String];
|
||||
sscanf(s, "%d.%d.%d", &M, &m, &b);
|
||||
[localPool release];
|
||||
return M*10000 + m*100 + b;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user