Fix "Crash when using copied SVG image" (#1546)
Build and Test / build-linux (push) Canceled after 0s
Build and Test / build-wayland (push) Canceled after 0s
Build and Test / build-wayland-arm64 (push) Canceled after 0s
Build and Test / build-macos (push) Canceled after 0s
Build and Test / build-windows (push) Canceled after 0s
Build and Test / build-windows-arm (push) Canceled after 0s

This commit is contained in:
ManoloFLTK
2026-07-31 12:42:40 +02:00
parent e22bbb71a1
commit 485428feab
+1
View File
@@ -317,6 +317,7 @@ void Fl_Graphics_Driver::draw_rgb(Fl_RGB_Image *img, int XP, int YP, int WP, int
Fl_RGB_Scaling keep = Fl_Image::RGB_scaling();
Fl_Image::RGB_scaling(Fl_Image::scaling_algorithm());
Fl_RGB_Image *img2 = (Fl_RGB_Image*)img->copy(w2, h2);
img2->normalize(); // necessary when img is an Fl_SVG_Image
Fl_Image::RGB_scaling(keep);
cache(img2);
draw_fixed(img2, XP, YP, WP, HP, cx, cy);