1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-02 03:50:36 +00:00

Implements proper error handling for Cliboard routine on macOS.

This commit is contained in:
Fellippe Heitor 2017-10-18 20:58:26 -02:00
parent 50b1002aa4
commit a5f702eb6f

View file

@ -24596,14 +24596,14 @@ return -1;
err = badPasteboardSyncErr;
err = PasteboardGetItemCount( inPasteboard, &itemCount );
//require_noerr( err, CantGetPasteboardItemCount );
if ( (err) != noErr ) goto CantGetPasteboardItemCount;
for( int itemIndex = 1; itemIndex <= itemCount; itemIndex++ ) {
PasteboardItemID itemID;
CFDataRef flavorData;
err = PasteboardGetItemIdentifier( inPasteboard, itemIndex, &itemID );
//require_noerr( err, CantGetPasteboardItemIdentifier );
if ( (err) != noErr ) goto CantGetPasteboardItemIdentifier;
err = PasteboardCopyItemFlavorData( inPasteboard, itemID, CFSTR("public.utf8-plain-text"), &flavorData );
data = (char*)CFDataGetBytePtr(flavorData);