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) {
818818 */
819819public void drawOnGCAtTargetSize (Consumer <Long > drawFunction , int targetWidth , int targetHeight ) {
820820 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 ];
822823 drawFunction .accept (tempHandle );
823- //Handle aufräumen
824+ if (handleContainer .type == SWT .ICON ) {
825+ OS .DestroyIcon (tempHandle );
826+ } else {
827+ OS .DeleteObject (tempHandle );
828+ }
824829}
825830
826831/**
You can’t perform that action at this time.
0 commit comments