diff --git a/lcl/interfaces/cocoa/cocoatextedits.pas b/lcl/interfaces/cocoa/cocoatextedits.pas index cd87db51fa..5da5d381ca 100644 --- a/lcl/interfaces/cocoa/cocoatextedits.pas +++ b/lcl/interfaces/cocoa/cocoatextedits.pas @@ -1463,7 +1463,9 @@ begin inherited drawRect(dirtyRect); // if ownerDrawn style, then need to call "DrawItem" event - if isOwnerDrawn and Assigned(callback) then + if isOwnerDrawn and Assigned(callback) + and (lastSelectedItemIndex>=0) and (lastSelectedItemIndex