File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -818,9 +818,14 @@ public static long win32_getHandle (Image image, int zoom) {
818
818
*/
819
819
public void drawOnGCAtTargetSize (Consumer <Long > drawFunction , int targetWidth , int targetHeight ) {
820
820
ImageData imageData = this .imageProvider .newImageData (targetWidth , targetHeight );
821
- long tempHandle = init (device , imageData ).handles ()[0 ];
821
+ HandleForImageDataContainer handleContainer = init (device , imageData );
822
+ long tempHandle = handleContainer .handles ()[0 ];
822
823
drawFunction .accept (tempHandle );
823
- //Handle aufräumen
824
+ if (handleContainer .type == SWT .ICON ) {
825
+ OS .DestroyIcon (tempHandle );
826
+ } else {
827
+ OS .DeleteObject (tempHandle );
828
+ }
824
829
}
825
830
826
831
/**
You can’t perform that action at this time.
0 commit comments