Fixed a rare crash on Raspberry Pi when creating a window

This commit is contained in:
Sam Lantinga
2026-05-20 14:56:54 -07:00
parent ef9a5b7040
commit 0dbd9d2a65

View File

@@ -470,6 +470,10 @@ void Wayland_data_offer_notify_from_mimes(SDL_WaylandDataOffer *offer, bool chec
// Do a first pass to compute allocation size.
SDL_MimeDataList *item = NULL;
wl_list_for_each(item, &offer->mimes, link) {
if (!item->mime_type) {
continue;
}
// If origin metadata is found, queue a check and wait for confirmation that this offer isn't recursive.
if (check_origin && SDL_strcmp(item->mime_type, SDL_DATA_ORIGIN_MIME) == 0) {
Wayland_data_offer_check_source(offer, item->mime_type);
@@ -493,6 +497,10 @@ void Wayland_data_offer_notify_from_mimes(SDL_WaylandDataOffer *offer, bool chec
item = NULL;
int i = 0;
wl_list_for_each(item, &offer->mimes, link) {
if (!item->mime_type) {
continue;
}
new_mime_types[i] = strPtr;
strPtr = stpcpy(strPtr, item->mime_type) + 1;
i++;