mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-09-09 04:54:33 +00:00
#471: speculative fix
This commit is contained in:
parent
ca84d557fc
commit
57bc570cc9
@ -3391,6 +3391,7 @@ nsNativeThemeCocoa::DrawWidgetBackground(nsRenderingContext* aContext,
|
|||||||
// draw a focus ring
|
// draw a focus ring
|
||||||
if (eventState.HasState(NS_EVENT_STATE_FOCUS)) {
|
if (eventState.HasState(NS_EVENT_STATE_FOCUS)) {
|
||||||
NSGraphicsContext* savedContext = [NSGraphicsContext currentContext];
|
NSGraphicsContext* savedContext = [NSGraphicsContext currentContext];
|
||||||
|
if (MOZ_UNLIKELY(!savedContext)) break; // speculative fix issue 471
|
||||||
[NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithGraphicsPort:cgContext flipped:YES]];
|
[NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithGraphicsPort:cgContext flipped:YES]];
|
||||||
CGContextSaveGState(cgContext);
|
CGContextSaveGState(cgContext);
|
||||||
NSSetFocusRingStyle(NSFocusRingOnly);
|
NSSetFocusRingStyle(NSFocusRingOnly);
|
||||||
|
Loading…
Reference in New Issue
Block a user