getOSXVersion crashes on macOS 10.7

Hi,

This patch broke getOSXVersion on older macos versions, causing a crash when this function is called:

The crash error is:
[__NSCFDictionary objectForKeyedSubscript:]: unrecognized selector sent to instance

Replacing:

return nsStringToJuce (dict[nsStringLiteral ("ProductVersion")]);
with
return nsStringToJuce ([dict objectForKey: nsStringLiteral ("ProductVersion")]);

Fixes it.

3 Likes

Thanks for reporting!

1 Like