diff options
author | Sravan Kumar Lakkimsetti | 2020-04-21 06:25:46 +0000 |
---|---|---|
committer | Sravan Kumar Lakkimsetti | 2020-04-21 06:25:46 +0000 |
commit | 83ded1aeec6e3caca694ff80694eb38c4c380c60 (patch) | |
tree | 28d378d800e8af938b7f3f9d899a091075f072cf | |
parent | fb1bc0c0428a4e10a32ae9193368fe711ba0e843 (diff) | |
download | eclipse.platform.swt-83ded1aeec6e3caca694ff80694eb38c4c380c60.tar.gz eclipse.platform.swt-83ded1aeec6e3caca694ff80694eb38c4c380c60.tar.xz eclipse.platform.swt-83ded1aeec6e3caca694ff80694eb38c4c380c60.zip |
Bug 548430 - [Cocoa] NullPointerException in Image.internal_new_GC
(4.12.0RC2)
Change-Id: I92b65d02e9ff3601f38bdc097af28b8b4c4b5f32
Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
-rw-r--r-- | bundles/org.eclipse.swt/.settings/.api_filters | 8 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/.settings/.api_filters b/bundles/org.eclipse.swt/.settings/.api_filters index 715f2c1742..8eeef2e058 100644 --- a/bundles/org.eclipse.swt/.settings/.api_filters +++ b/bundles/org.eclipse.swt/.settings/.api_filters @@ -248,6 +248,14 @@ </message_arguments> </filter> </resource> + <resource path="Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java" type="org.eclipse.swt.widgets.Display"> + <filter id="336744520"> + <message_arguments> + <message_argument value="@noextend"/> + <message_argument value="org.eclipse.swt.widgets.Display"/> + </message_arguments> + </filter> + </resource> <resource path="Eclipse SWT/common/org/eclipse/swt/events/ArmListener.java" type="org.eclipse.swt.events.ArmListener"> <filter id="576720909"> <message_arguments> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java index 3e308a06cb..bd436003dd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java @@ -1622,6 +1622,10 @@ public long internal_new_GC (GCData data) { NSBitmapImageRep imageRep = getRepresentation(); NSGraphicsContext context = NSGraphicsContext.graphicsContextWithBitmapImageRep(imageRep); + if (context == null) { + imageRep.setAlpha(false); + context = NSGraphicsContext.graphicsContextWithBitmapImageRep(imageRep); + } NSGraphicsContext flippedContext = NSGraphicsContext.graphicsContextWithGraphicsPort(context.graphicsPort(), true); context = flippedContext; context.retain(); |