Only call clipboard callbacks with mime types they expect
Also clarified that returning NULL from a callback sends zero length data to the receiver, which should be able to handle that.
Fixes https://github.com/libsdl-org/SDL/issues/9586
(cherry picked from commit 23e3cbec20)
This commit is contained in:
1 parent
8dcb6db823
commit
d6021b7d89
3 files changed
+9
-5
No files matched your search
@@ -34,6 +34,7 @@ static const void *ClipboardDataCallback(void *userdata, const char *mime_type,
|
||||
*size = icon_bmp_len;
|
||||
return icon_bmp;
|
||||
} else {
|
||||
SDL_Log("Called with unexpected mime type: %s", mime_type);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user