Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8235638

NPE in LWWindowPeer.getOnscreenGraphics()

    Details

    • Resolved In Build:
      b07

      Description

      The LWWindowPeer.getOnscreenGraphics() is incorrectly null-check the surface data:
         protected final Graphics getOnscreenGraphics(Color fg, Color bg, Font f) {
          [1] if (getSurfaceData() == null) {
                  return null;
              }
      .....
              if (f == null) {
                  f = DEFAULT_FONT;
              }
          [2] return new SunGraphics2D(getSurfaceData(), fg, bg, f);
          }
      If surfaceData became null after the check [1] but before [2] we wil get NPE.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                serb Sergey Bylokhov
                Reporter:
                serb Sergey Bylokhov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: