mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-01 11:40:33 +00:00
8173853: IllegalArgumentException in java.awt.image.ReplicateScaleFilter
Reviewed-by: prr, serb
This commit is contained in:
parent
17679435a1
commit
18154936f0
@ -66,7 +66,8 @@ public abstract class CustomCursor extends Cursor {
|
||||
|
||||
// Scale image to nearest supported size.
|
||||
Dimension nativeSize = toolkit.getBestCursorSize(width, height);
|
||||
if (nativeSize.width != width || nativeSize.height != height) {
|
||||
if ((nativeSize.width != width || nativeSize.height != height) &&
|
||||
(nativeSize.width != 0 && nativeSize.height != 0)) {
|
||||
cursor = cursor.getScaledInstance(nativeSize.width,
|
||||
nativeSize.height,
|
||||
Image.SCALE_DEFAULT);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user