GP-2924 fixed null pointer exception in Project Lock dialog

This commit is contained in:
ghidragon 2022-12-12 13:21:08 -05:00
parent db932d2228
commit 71b972f23b
2 changed files with 4 additions and 2 deletions

View file

@ -497,8 +497,9 @@ public class TextLayoutGraphics extends Graphics2D {
@Override
public AffineTransform getTransform() {
// stub
return null;
// Some UIs (e.g. FlatLookAndFeel) expect a transform to be applied in some situations
// depending on high resolution monitor settings
return new AffineTransform();
}
@Override

View file

@ -773,6 +773,7 @@ public class HTMLUtilities {
new Rectangle(-size.width, -size.height, size.width * 2, size.height * 10);
TextLayoutGraphics g = new TextLayoutGraphics();
g.setClip(bounds);
label.paint(g);
g.flush();