changeset 6463:47cdc463b4b0

7175704: [macosx] "8" PIT: NPE in GetDisplayMode fullscreen test Reviewed-by: serb, leonidr
author kizune
date Wed, 17 Oct 2012 14:32:15 +0400
parents f42d178f0452
children e6a8ee65d248
files src/macosx/classes/sun/awt/CGraphicsDevice.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/classes/sun/awt/CGraphicsDevice.java	Tue Oct 16 20:11:19 2012 +0400
+++ b/src/macosx/classes/sun/awt/CGraphicsDevice.java	Wed Oct 17 14:32:15 2012 +0400
@@ -194,6 +194,9 @@
 
     @Override
     public void setDisplayMode(DisplayMode dm) {
+        if (dm == null) {
+            throw new IllegalArgumentException("Invalid display mode");
+        }
         nativeSetDisplayMode(displayID, dm.getWidth(), dm.getHeight(), dm.getBitDepth(), dm.getRefreshRate());
         if (isFullScreenSupported() && getFullScreenWindow() != null) {
             getFullScreenWindow().setSize(dm.getWidth(), dm.getHeight());