Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8265835: Exception in Quantum due to null platformWindow
Reviewed-by: arapte
  • Loading branch information
lukostyra authored and arapte committed Nov 3, 2022
1 parent 748107a commit 01735b3
Showing 1 changed file with 5 additions and 3 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -335,13 +335,15 @@ public final synchronized boolean getDoPresent() {

protected Color getClearColor() {
WindowStage windowStage = stage instanceof WindowStage ? (WindowStage)stage : null;
if (windowStage != null && windowStage.getPlatformWindow().isTransparentWindow()) {
if (windowStage != null && windowStage.getPlatformWindow() != null &&
windowStage.getPlatformWindow().isTransparentWindow()) {
return (Color.TRANSPARENT);
} else {
if (fillPaint == null) {
return Color.WHITE;
} else if (fillPaint.isOpaque() ||
(windowStage != null && windowStage.getPlatformWindow().isUnifiedWindow())) {
(windowStage != null && windowStage.getPlatformWindow() != null &&
windowStage.getPlatformWindow().isUnifiedWindow())) {
//For bare windows the transparent fill is allowed
if (fillPaint.getType() == Paint.Type.COLOR) {
return (Color)fillPaint;
Expand Down

1 comment on commit 01735b3

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.