You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-30 18:30:54 +00:00
Adds null and range checks to DisplayServerMacOSBase::clipboard_get().
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user