Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 258355 Details for
Bug 434393
[Cocoa] OS X: NPE in Control.internal_new_GC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
Bug-434393--OS-X-NPE-in-ControlinternalnewGC.patch (text/plain), 1.74 KB, created by
Lakshmi P Shanmugam
on 2015-11-30 06:04:36 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Lakshmi P Shanmugam
Created:
2015-11-30 06:04:36 EST
Size:
1.74 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java >index 7cf0cf2..0870bb9 100644 >--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java >+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java >@@ -2152,12 +2152,12 @@ > public long /*int*/ internal_new_GC (GCData data) { > checkWidget(); > NSView view = paintView(); >- long /*int*/ context = 0; >+ NSGraphicsContext graphicsContext = null; > if (data != null && data.paintRect != null) { >- NSGraphicsContext graphicsContext = NSGraphicsContext.currentContext(); >- context = graphicsContext.id; >+ graphicsContext = NSGraphicsContext.currentContext(); > if (!view.isFlipped()) data.state &= ~VISIBLE_REGION; >- } else { >+ } >+ if (graphicsContext == null) { > NSWindow window = view.window(); > /* > * Force the device to be created before attempting >@@ -2170,10 +2170,9 @@ > window.orderOut(null); > window.setAlphaValue(alpha); > } >- NSGraphicsContext graphicsContext = NSGraphicsContext.graphicsContextWithWindow (window); >+ graphicsContext = NSGraphicsContext.graphicsContextWithWindow (window); > NSGraphicsContext flippedContext = NSGraphicsContext.graphicsContextWithGraphicsPort(graphicsContext.graphicsPort(), true); > graphicsContext = flippedContext; >- context = graphicsContext.id; > if (data != null) { > data.flippedContext = flippedContext; > data.state &= ~VISIBLE_REGION; >@@ -2197,7 +2196,10 @@ > data.background = control.getBackgroundColor ().handle; > data.font = font != null ? font : defaultFont (); > } >- return context; >+ if (graphicsContext != null) { >+ return graphicsContext.id; >+ } >+ return 0; > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 434393
:
257162
| 258355