Merge pull request #88220 from FaycalElOuariachi/display_server_windows-clipboard_get_image-fix-DIB-image-import

Fix the fetching of images in `CF_DIB` format in `DisplayServerWindows::clipboard_get_image`
This commit is contained in:
Rémi Verschelde 2024-02-12 13:35:11 +01:00
commit f317cc713a
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 2 deletions

View File

@ -760,8 +760,7 @@ Ref<Image> DisplayServerWindows::clipboard_get_image() const {
pba.append(rgbquad->rgbReserved);
}
}
image.instantiate();
image->create_from_data(info->biWidth, info->biHeight, false, Image::Format::FORMAT_RGBA8, pba);
image = Image::create_from_data(info->biWidth, info->biHeight, false, Image::Format::FORMAT_RGBA8, pba);
GlobalUnlock(mem);
}