Cocoa Port: Fixes the use of macOS GUI sheets in Lion and Mountain Lion. (Regression from commit e9b3998f.)

This commit is contained in:
rogerman 2022-04-02 15:40:23 -07:00
parent e9b3998fe8
commit 8f20237c04
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@
}
#if defined(MAC_OS_X_VERSION_10_9) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9)
if ([[sheet sheetParent] respondsToSelector:@selector(endSheet:returnCode:)])
if ([sheet respondsToSelector:@selector(sheetParent)] && [[sheet sheetParent] respondsToSelector:@selector(endSheet:returnCode:)])
{
[[sheet sheetParent] endSheet:sheet returnCode:code];
}