minor cocoa additional checks

git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@46152 4005530d-fff6-0310-9dd1-cebe43e6787f
customdrawn patch from Bernd

git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@46153 4005530d-fff6-0310-9dd1-cebe43e6787f