Merge pull request #108372 from bruvzg/mac_clip_c
Add `null` and range checks to `DisplayServerMacOSBase::clipboard_get()`.
This commit is contained in:
commit
dda53d761a
1 changed files with 3 additions and 0 deletions
|
|
@ -62,6 +62,9 @@ String DisplayServerMacOSBase::clipboard_get() const {
|
|||
}
|
||||
|
||||
NSArray *objectsToPaste = [pasteboard readObjectsForClasses:classArray options:options];
|
||||
if (!objectsToPaste || [objectsToPaste count] < 1) {
|
||||
return "";
|
||||
}
|
||||
NSString *string = [objectsToPaste objectAtIndex:0];
|
||||
|
||||
String ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue