jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java
changeset 37692 36bbad48872b
parent 37550 c8252b8fea3d
child 44149 92b8963f6498
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java	Fri Apr 15 11:48:08 2016 +0530
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java	Fri Apr 15 11:52:23 2016 +0530
@@ -404,6 +404,10 @@
     public final PrintJob getPrintJob(Frame frame, String doctitle,
                                       JobAttributes jobAttributes,
                                       PageAttributes pageAttributes) {
+        if (frame == null) {
+            throw new NullPointerException("frame must not be null");
+        }
+
         if (GraphicsEnvironment.isHeadless()) {
             throw new IllegalArgumentException();
         }