Sfoglia il codice sorgente

FIX: Don't use LoadFromIntfImage (it can crash when called from separate thread under GTK2)

Alexander Koblov 6 anni fa
parent
commit
4f33887d78
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      src/uresample.pas

+ 3 - 1
src/uresample.pas

@@ -345,6 +345,7 @@ var
   SrcHeight		,
   DstWidth		,
   DstHeight		: integer;
+  ARawImage		: TRawImage;
 
   function Color2RGBA(Color: TFPColor): TColorRGBA; inline;
   begin
@@ -667,7 +668,8 @@ begin
 
     FreeMem(contrib);
 
-    Dst.LoadFromIntfImage(DstIntfImage);
+    DstIntfImage.GetRawImage(ARawImage, True);
+    Dst.LoadFromRawImage(ARawImage, True);
 
   finally
     FreeMem(Work);