Cocoa: fix the crash when set TComboBox.DropDown with csDropDownList

This commit is contained in:
rich2014 2024-08-09 22:49:08 +08:00
parent e7c8818403
commit 7124597b46

View File

@ -1987,7 +1987,8 @@ begin
Exit; Exit;
if not ADroppedDown then exit; if not ADroppedDown then exit;
comboBox:= TCocoaComboBox(ACustomComboBox.Handle); comboBox:= TCocoaComboBox(ACustomComboBox.Handle);
comboBox.cell.performSelector_withObject_afterDelay( ObjCSelector('moveDown:'), nil, 0 ); if comboBox.cell.respondsToSelector(ObjCSelector('moveDown:')) then
comboBox.cell.performSelector_withObject_afterDelay( ObjCSelector('moveDown:'), nil, 0 );
end; end;