summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
index bec4566097..9c5d5f57a4 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
@@ -943,8 +943,8 @@ int[] createGdipImage() {
} else {
img = Gdip.Bitmap_new(handle);
}
- if (iconInfo.hbmColor == 0) OS.DeleteObject(iconInfo.hbmColor);
- if (iconInfo.hbmMask == 0) OS.DeleteObject(iconInfo.hbmMask);
+ if (iconInfo.hbmColor != 0) OS.DeleteObject(iconInfo.hbmColor);
+ if (iconInfo.hbmMask != 0) OS.DeleteObject(iconInfo.hbmMask);
return new int[]{img, pixels};
}
default: SWT.error(SWT.ERROR_UNSUPPORTED_FORMAT);