mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-04 04:50:22 +00:00
Implements proper error handling for Cliboard routine on macOS.
This commit is contained in:
parent
50b1002aa4
commit
a5f702eb6f
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue